symbol table.
2006-07-05 Ulrich Drepper <drepper@redhat.com>
+ * ldgeneric.c (ld_generic_create_outfile): Correctly recognize
+ discarded COMDAT symbols.
+
* i386_ld.c (elf_i386_count_relocations): Lot of corrections.
(elf_i386_create_relocations): Likewise.
* ld.h (struct symbol): Add local and hidden bits.
Don't hide global, defined symbols in dynamic symbol table unless
requested. Synthetic symbols have no version information.
- * elflint.c: Add support for checking 64-bit SyV-stlye hash tables.
- * readelf.c: Add support for printing 64-bit SyV-stlye hash tables.
+ * elflint.c: Add support for checking 64-bit SysV-style hash tables.
+ * readelf.c: Add support for printing 64-bit SysV-style hash tables.
2006-07-04 Ulrich Drepper <drepper@redhat.com>
Elf_Data *data;
/* Iterate over all the input sections. Appropriate data buffers in the
- output sections were already created. I get them iteratively, too. */
+ output sections were already created. */
runp = firstp;
data = NULL;
do
itself. */
if (XELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
- Elf32_Word toadd;
-
- /* We expect here on R_386_32 relocations. */
+ /* We expect here only R_386_32 relocations. */
assert (XELF_R_TYPE (rel->r_info) == R_386_32);
/* Avoid writing to the section memory if this is
effectively a no-op since it might save a
copy-on-write operation. */
- toadd = file->scninfo[xndx].offset;
+ Elf32_Word toadd = file->scninfo[xndx].offset;
if (toadd != 0)
add_4ubyte_unaligned (reltgtdata->d_buf + rel->r_offset,
toadd);
/* Traditionally: globally visible. */
sym->st_info = XELF_ST_INFO (symst->local ? STB_LOCAL : STB_GLOBAL,
symst->type);
- sym->st_other = symst->hidden ? STV_HIDDEN : 0;
+ sym->st_other = symst->hidden ? STV_HIDDEN : STV_DEFAULT;
/* Reference to the GOT or dynamic section. Since the GOT and
dynamic section are only created for executables and DSOs it
cannot be that the section index is too large. */
For executables (shared or not) we have to create the program header,
additional sections like the .interp, eventually (in addition) create
a dynamic symbol table and a dynamic section. Also the relocations
-have to be processed differently. */
+ have to be processed differently. */
static int
ld_generic_create_outfile (struct ld_state *statep)
{
file = ld_state.relfiles->next;
symdata = elf_getdata (elf_getscn (ld_state.outelf, ld_state.symscnidx),
NULL);
+
do
{
size_t maxcnt;
defp = file->symref[cnt];
/* Ignore symbols in discarded COMDAT group sections. */
- if (defp != NULL)
+ if (defp != NULL || cnt < file->nlocalsymbols)
{
/* Store the reference to the symbol record. The
sorting code will have to keep this array in the
nothing. */
assert (xndxdata == NULL || need_xndx);
-
/* Create the version related sections. */
if (ld_state.verneedscnidx != 0)
{