[PATCH] x86-64: support newer relocation types
Jan Beulich
JBeulich@novell.com
Thu Jun 16 06:47:00 GMT 2005
More information about the Binutils mailing list
Thu Jun 16 06:47:00 GMT 2005
- Previous message (by thread): [PATCH] x86-64: support newer relocation types
- Next message (by thread): [PATCH] x86-64: support newer relocation types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>> If so, this would seem to be an unrelated change, as the GOTPC32 reloc in my >>patch is handled exactly like the i386 one (which of course is very broken, but >>obviously cannot be fixed). Or maybe I don't see how you would see >>BFD_RELOC_32_PCREL to end up here. > >i386 GOT relocation is different from GOTPC32 in a way that one is IP >relative and other not. >I386 way of encoding GOT relocation is: > addl $_GLOBAL_OFFSET_TABLE_+[.-.L2], %ebx >While for x86-64 we want something like: > leaq _GLOBAL_OFFSET_TABLE_(%rip), %rbx >So the expression to match needs tobe slightly different. While the explanation is only partly right (we're talking about i386's GOTPC vs. x86-64's GOTPC32 here, which have identical semantics), it also occured to me that the RIP-relative addressing makes a difference here. So I guess I'll have to add such code to the disp parser. However, the similar code in the immediate parser doesn't need to be changed (because in an immediate there cannot be any RIP-relative). Hopefully I'll have a revised patch later today... Jan
- Previous message (by thread): [PATCH] x86-64: support newer relocation types
- Next message (by thread): [PATCH] x86-64: support newer relocation types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list