]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ppc-aix: .bss relocation problem when overlapping with the .data section
authorJoel Brobecker <brobecker@gnat.com>
Tue, 1 Jan 2013 08:37:20 +0000 (08:37 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 1 Jan 2013 08:37:20 +0000 (08:37 +0000)
commit8333c85bf882a6ec58bd0be69f713542f7f446fd
treef5a13c713964d4d2f98313dcac843c2138e9e257
parent6e58437e3b25675483adfd1a044510c0731ef942
ppc-aix: .bss relocation problem when overlapping with the .data section

It has been observed that the GNU linker can sometimes improperly
set the address of the .bss section in such a way that it overlaps
with the end of the .data section.  This causes problems in GDB
when trying to print the value of variables located in that section,
because the loader appears to be gracefully but silently adjusting
the address of the .bss section to avoid the overlap, thus causing
a mismatch between the address where GDB thinks it is, vs the address
where it actually lives.

This patch works around the problem while it a fix in the linker
is being explored.

gdb/ChangeLog:

        * rs6000-nat.c (bss_data_overlap): New function.
        (vmap_symtab): Use it to adjust the .bss section's offset.
gdb/rs6000-nat.c