mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
output: elf,ieee,macho,obj -- Fix mofule name for commit 81b62b9f54
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>
This commit is contained in:
parent
8a231080e0
commit
51b453b097
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -384,6 +384,7 @@ static int32_t macho_gotpcrel_sect;
|
||||
|
||||
static void macho_init(void)
|
||||
{
|
||||
module_name = inname;
|
||||
sects = NULL;
|
||||
sectstail = §s;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user