This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Properly handle protected function for ia32 and x86_64

"H. J. Lu" <> 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" <> 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  <>
> 	* 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:

I approve the x86-64 part of the patch but would suggest that you wait
another day for comments before checking in,

 Andreas Jaeger,,
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 NÃrnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]