summaryrefslogtreecommitdiffstats
path: root/src/i386_ld.c
diff options
context:
space:
mode:
authorUlrich Drepper <[email protected]>2006-07-05 19:18:11 +0000
committerUlrich Drepper <[email protected]>2006-07-05 19:18:11 +0000
commit7df97c777c3c8a688774882a1dd7d1701a127560 (patch)
tree0e6b1e585b153101d4763b7eec797787e49ee2df /src/i386_ld.c
parent4ba68f475d305b11e55c83994bad4824dad156d3 (diff)
Correctly recognize discarded COMDATA symbols when constructing the
symbol table.
Diffstat (limited to 'src/i386_ld.c')
-rw-r--r--src/i386_ld.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/i386_ld.c b/src/i386_ld.c
index 33403eaf..60e45f3f 100644
--- a/src/i386_ld.c
+++ b/src/i386_ld.c
@@ -72,7 +72,7 @@ elf_i386_relocate_section (struct ld_state *statep __attribute__ ((unused)),
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
@@ -159,15 +159,13 @@ elf_i386_relocate_section (struct ld_state *statep __attribute__ ((unused)),
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);