PATCH COMMITTED: Output local section symbol relocs to merge sections
Ian Lance Taylor
iant@google.com
Mon Apr 7 22:49:00 GMT 2008
This patch adds support for outputting relocs against local section
symbols defined in merge sections. I originally thought this case
could not happen because I couldn't figure out any way to generate
code for it. But then I did figure out how to generate it, if we
permit x86-64 non-PIC object files to go into shared libraries. Which
we don't, but that's OK, the case will arise for other processors.
I committed this patch to make it work, including a test case which
would trigger it if we could.
Ian
2008-04-07 Ian Lance Taylor <iant@google.com>
* output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
addend parameter. Change caller. Handle merge sections.
(Output_reloc<SHT_REL>::symbol_value): Change parameter type from
Address to Addend. Don't add in the result of
local_section_offset, pass down the addend and use the returned
value.
* output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
Update declarations of local_section_offset and symbol_value.
* testsuite/two_file_test_1.cc (t18): New function.
* testsuite/two_file_test_2.cc (f18): New function.
* testsuite/two_file_test_main.cc (main): Call t18.
* testsuite/two_file_test.h (t18, f18): Declare.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 6021 bytes
Desc: Output local section symbol relocs to merge sections
URL: <https://sourceware.org/pipermail/binutils/attachments/20080407/e5c045fc/attachment.bin>
More information about the Binutils
mailing list