diff options
author | Alan Modra <amodra@gmail.com> | 2006-11-08 11:29:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-11-08 11:29:16 +0000 |
commit | 9e3be61d603553999904347b0bd5f14d3ee1f972 (patch) | |
tree | 1cbe07d36eb25bbbf4a19cd9a5a1d62cd2d7e1ba /ld/emultempl | |
parent | d661a1c202420f508152cb6b402c019e1d9441ff (diff) | |
download | gdb-9e3be61d603553999904347b0bd5f14d3ee1f972.zip gdb-9e3be61d603553999904347b0bd5f14d3ee1f972.tar.gz gdb-9e3be61d603553999904347b0bd5f14d3ee1f972.tar.bz2 |
ld/
* emultempl/elf32.em (gld*_before_allocation): Adjust output section
size for warning sections.
ld/testsuite/
* ld-elf/group.ld: Handle .rodata.brlt for powerpc64.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index ff48c56..03d9d8d 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1204,12 +1204,19 @@ ${ELF_INTERPRETER_SET_DEFAULT} ASSERT (ret); free (msg); - /* Clobber the section size, so that we don't waste copying the - warning into the output file. */ + /* Clobber the section size, so that we don't waste space + copying the warning into the output file. If we've already + sized the output section, adjust its size. The adjustment + is on rawsize because targets that size sections early will + have called lang_reset_memory_regions after sizing. */ + if (s->output_section != NULL + && s->output_section->rawsize >= s->size) + s->output_section->rawsize -= s->size; + s->size = 0; - /* Also set SEC_EXCLUDE, so that symbols defined in the warning - section don't get copied to the output. */ + /* Also set SEC_EXCLUDE, so that local symbols defined in the + warning section don't get copied to the output. */ s->flags |= SEC_EXCLUDE | SEC_KEEP; } } |