diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-02-25 15:50:35 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-02-25 15:50:35 +0300 |
commit | 51b453b0970a1d66c3f6533ed940cb9838ba2b18 (patch) | |
tree | db7bbcab936b314d902b3ca00acca0b55d46a3b0 | |
parent | 8a231080e0cbbc3a362f894534ab6e087bea3e1f (diff) | |
download | nasm-51b453b0970a1d66c3f6533ed940cb9838ba2b18.tar.gz |
output: elf,ieee,macho,obj -- Fix mofule name for commit 81b62b9f54ac8e4019a9b2ec2b95ec0faa86bd2a
These modules need a reference to input filename.
For example elf put into symbol table
| SYMBOL TABLE:
| 0000000000000000 l df *ABS* 0000000000000000 sha-64.asm
Otherwise this become empty string.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | output/outelf.c | 1 | ||||
-rw-r--r-- | output/outieee.c | 1 | ||||
-rw-r--r-- | output/outmacho.c | 1 | ||||
-rw-r--r-- | output/outobj.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/output/outelf.c b/output/outelf.c index 7ac2d54b..31a6ebdd 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -315,6 +315,7 @@ elf_directive(enum directive directive, char *value, int pass) static void elf_init(void) { + strlcpy(elf_module, inname, sizeof(elf_module)); sects = NULL; nsects = sectlen = 0; syms = saa_init((int32_t)sizeof(struct elf_symbol)); diff --git a/output/outieee.c b/output/outieee.c index 114c8151..8500f967 100644 --- a/output/outieee.c +++ b/output/outieee.c @@ -209,6 +209,7 @@ static void ieee_unqualified_name(char *, char *); */ static void ieee_init(void) { + strlcpy(ieee_infile, inname, sizeof(ieee_infile)); any_segs = false; fpubhead = NULL; fpubtail = &fpubhead; diff --git a/output/outmacho.c b/output/outmacho.c index 742c2948..9d55269d 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -384,6 +384,7 @@ static int32_t macho_gotpcrel_sect; static void macho_init(void) { + module_name = inname; sects = NULL; sectstail = §s; diff --git a/output/outobj.c b/output/outobj.c index c9418db0..054963bb 100644 --- a/output/outobj.c +++ b/output/outobj.c @@ -640,6 +640,7 @@ static enum directive_result obj_directive(enum directive, char *, int); static void obj_init(void) { + strlcpy(obj_infile, inname, sizeof(inname)); first_seg = seg_alloc(); any_segs = false; fpubhead = NULL; |