svn commit: r1304 - in trunk/yasm/modules/objfmts/elf: tests

peter at tortall.net peter at tortall.net
Tue Nov 1 00:26:22 PST 2005


Author: peter
Date: Tue Nov  1 00:26:19 2005
New Revision: 1304

Added:
   trunk/yasm/modules/objfmts/elf/tests/elftypesize.asm
   trunk/yasm/modules/objfmts/elf/tests/elftypesize.errwarn
   trunk/yasm/modules/objfmts/elf/tests/elftypesize.hex
Modified:
   trunk/yasm/modules/objfmts/elf/elf-objfmt.c
   trunk/yasm/modules/objfmts/elf/elf.c
   trunk/yasm/modules/objfmts/elf/elf.h
   trunk/yasm/modules/objfmts/elf/tests/Makefile.inc
Changeset:
   http://www.tortall.net/projects/yasm/changeset/1304

Log:
Fix the use of ELF type/size directives with local variables.

* elf.h (elf_symtab_entry): Add in_table flag.
(elf_sym_in_table): New.
* elf.c (elf_symtab_entry_create): Initialize in_table to 0.
(elf_symtab_append_entry, elf_symtab_insert_local_sym): Set flag to 1.

* elf.c (elf_symtab_insert_local_sym): Don't create the entry here, instead
take it as a parameter.

* elf-objfmt.c (elf_objfmt_symtab_append): Only add if not in table by
checking new in_table flag.
(elf_objfmt_append_local_sym): Likewise, and pull some of the logic from
the old elf_symtab_insert_local_sym function to do it.
(elf_objfmt_directive): Don't append to ELF symbol table here, as we don't
know yet if the variable is global or local.



More information about the yasm-cvs mailing list