This is the mail archive of the binutils@sources.redhat.com 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: ppc64 without dot syms and linux kernel interaction


On Wed, Aug 18, 2004 at 09:54:29AM +0200, Jakub Jelinek wrote:
> what do you think should be done in the new ABI with garbage collection of
> .opd entries (.opd entries for functions not exported from a binary
> or shared library and whose address is never taken don't need to be persent)?
> In the old ABI it would be enough just to kill the .opd entries,
> but in the new ABI if the .opd entry is removed, suddenly debugger
> (and objdump -d) will not know anything about the function.
> Should such operation move the non-dot symbol to the actual function
> body in that case (in addition to removing the unneeded .opd entry)?

I considered removing unused .opd entries previously (eg. my comment at
the head of ppc64_elf_edit opd), but decided against it for two reasons.

One is that debuggers ought to be using the .opd symbol and doing
function descriptor lookup on PowerPC64 to find function entry points,
regardless of whether a dot-symbol is available or not.  Proper support
in gdb for function descriptors will likely remove the need for a lot
of hacky symbol manipulation code all over the place..

The other is that for a debugger like gdb to support user code function
calls, eg. p debug_rtx (insn), you need to know the proper toc pointer
value for the function.  With multiple toc support, that's really only
available in the opd entry.

So, I'd say that opd entries should only be removed under control of
some linker option.  We'd need to make it clear to users that opd entry
removal, like various ld --strip options, makes the resulting binary
difficult to debug.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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