Don't output absolute output path in binfmt mapfile for tests (#305)

This commit is contained in:
Anonymous Maarten 2026-07-21 07:31:42 +02:00 committed by GitHub
parent 430e4f55c0
commit baa3b160ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 23 additions and 14 deletions

View file

@ -30,6 +30,7 @@
#include <unistd.h>
#endif
#include <libyasm.h>
#include <string.h>
#define REGULAR_OUTBUF_SIZE 1024
@ -778,7 +779,15 @@ output_map(bin_objfmt_output_info *info)
for (i=0; i<63; i++)
fputc('-', f);
fprintf(f, "\n\nSource file: %s\n", info->object->src_filename);
fprintf(f, "Output file: %s\n\n", info->object->obj_filename);
if (getenv("YASM_TEST_SUITE")) {
const char *filename = info->object->obj_filename;
const char *next_filename;
while ((next_filename = strpbrk(filename, "/\\")))
filename = next_filename + 1;
fprintf(f, "Output file: %s\n\n", filename);
} else {
fprintf(f, "Output file: %s\n\n", info->object->obj_filename);
}
fprintf(f, "-- Program origin ");
for (i=0; i<61; i++)

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/bin-align
Output file: bin-align
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/bin-ssym
Output file: bin-ssym
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/initbss
Output file: initbss
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/ldlinux-sects
Output file: ldlinux-sects
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/multisect1
Output file: multisect1
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/multisect2
Output file: multisect2
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/multisect3
Output file: multisect3
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/multisect4
Output file: multisect4
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/multisect5
Output file: multisect5
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/nomultisect1
Output file: nomultisect1
-- Program origin -------------------------------------------------------------

View file

@ -2,7 +2,7 @@
- YASM Map file ---------------------------------------------------------------
Source file: -
Output file: results/nomultisect2
Output file: nomultisect2
-- Program origin -------------------------------------------------------------

View file

@ -1,2 +1,2 @@
-:2: warning: label alone on aline without a colon might be in error
-:3: warning: label alone on aline without a colon might be in error
-:2: warning: label alone on a line without a colon might be in error
-:3: warning: label alone on a line without a colon might be in error