This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Correct the type of _PROCEDURE_LINKAGE_TABLE_
On Fri, May 28, 2004 at 10:31:18AM -0400, Daniel Jacobowitz wrote:
> > Yes, that would be breaking objdump, not fixing it. Fixing objdump
> > would mean recognizing that _PROCEDURE_LINKAGE_TABLE_, or the .plt
> > section, is a special case. That probably wouldn't be done in objdump
> > itself, though. This is a hack, but not a horrible one: the PLT
> > really is a special case.
>
> We could do that.
Perhaps you could use the *synthetic_symtab hook I've added recently for that.
In addition to all those synthetic foo@plt symbols add one symbol for the
beginning of .plt and make sure it will be sorted before the actual
_PROCEDURE_LINKAGE_TABLE_ symbol.
It can be _PROCEDURE_LINKAGE_TABLE_ as well, would need to study
compare_symbols how to trick it to have this one first.
This would not help just the targets which have this symbol, but
others as well.
ATM e.g. on i386 I get:
Disassembly of section .plt:
080488a0 <__fpending@plt-0x10>:
80488a0: ff 35 e8 b0 04 08 pushl 0x804b0e8
80488a6: ff 25 ec b0 04 08 jmp *0x804b0ec
80488ac: 00 00 add %al,(%eax)
...
080488b0 <__fpending@plt>:
80488b0: ff 25 f0 b0 04 08 jmp *0x804b0f0
80488b6: 68 00 00 00 00 push $0x0
80488bb: e9 e0 ff ff ff jmp 80488a0 <__fpending@plt-0x10>
080488c0 <__overflow@plt>:
80488c0: ff 25 f4 b0 04 08 jmp *0x804b0f4
80488c6: 68 08 00 00 00 push $0x8
80488cb: e9 d0 ff ff ff jmp 80488a0 <__fpending@plt-0x10>
__fpending@plt-0x10 is certainly not pretty, .plt or
_PROCEDURE_LINKAGE_TABLE_ would be far better.
Jakub