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:
Cyrill Gorcunov 2018-02-25 15:50:35 +03:00
parent 8a231080e0
commit 51b453b097
4 changed files with 4 additions and 0 deletions

View File

@ -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));

View File

@ -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;

View File

@ -384,6 +384,7 @@ static int32_t macho_gotpcrel_sect;
static void macho_init(void)
{
module_name = inname;
sects = NULL;
sectstail = &sects;

View File

@ -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;