PATCH: Properly handle protected function for ia32 and x86_64
Andreas Jaeger
aj@suse.de
Sun Jan 30 10:22:00 GMT 2005
"H. J. Lu" <hjl@lucon.org> writes:
> On Thu, Jan 20, 2005 at 09:33:54AM -0800, H. J. Lu wrote:
>> On Thu, Jan 20, 2005 at 11:17:55AM +0100, Andreas Schwab wrote:
>> > "H. J. Lu" <hjl@lucon.org> writes:
>> >
>> > > I don't think we should worry about anything, like wrong insn, r_offset
>> > > == 0, jump table or data section.
>> >
>> > At least we shouldn't crash.
>>
>> How about this patch?
>>
>>
>
> I updated the patch to make ia32 and x86_64 the same in dealing with
> protected function symbols. On ia32, I disallow R_386_GOTOFF on
> protected function and on x86_64, I allow 32bit relative branch on
> protected function. Since we only warn global symbols, there is no
> need to check if h is NULL. Also I updated error message.
>
>
> H.J.
> ----
> 2005-01-24 H.J. Lu <hongjiu.lu@intel.com>
>
> * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
> against protected function when building shared library.
>
> PR 584
> * elf64-x86-64.c (is_32bit_relative_branch): New.
> (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
> protected function symbol when building shared library for
> 32bit relative branch instruction.
I guess this bug is the reason for this one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664
I approve the x86-64 part of the patch but would suggest that you wait
another day for comments before checking in,
thanks,
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050130/2fe5d408/attachment.sig>
More information about the Binutils
mailing list