This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Strange stepping behaviour with ppc32 with secure PLTs


On Fri, May 12, 2006 at 02:38:55PM -0700, PAUL GILLIAM wrote:
> >> I would rather have a GDB only solution.
> >
> > Why?
> 
> I am not familiar enough with BFD to implement <foo@stub> symbols is a reasonable time.

I would like to introduce to you a magical technique for fixing PowerPC
bugs in BFD.

Hey, Alan, Paul's pointed out that there are no synthetic symbols for
the stubs in -msecure-plt mode.  How hard would that be to fix?

> > What do you mean by "unknown section"?
> 
> This is what I mean:
> (top-gdb) p *bfd_section
> $2 = {name = 0x1049c528 "*UND*", id = 1, index = 0, ...

That's not an "unknown" section.  That's the undefined section!  It
means that the symbol has a value, but is marked as undefined.  This
is typical for PLT entry stubs, but it's an implementation choice;
I don't think the gABI has much to say about undefined symbols with
addresses.

The right thing to do then is probably to create the synthetic symbols
at exactly those same addresses.

> 2006-05-12  Paul Gilliam  <pgilliam@us.ibm.com>
> 
> 	* minsyms.c (lookup_minimal_symbol_by_pc_section): Don't ignore
> 	minimal symbols for solib trampolines just because they're in a
> 	different section than the PC.

This one I'd have to think about, but if synthetic symbols were not an
option, it might be reasonable.  The second patch is definitely
incorrect.  Generally any use of SECT_OFF_TEXT for something whose
section you don't know is incorrect.

-- 
Daniel Jacobowitz
CodeSourcery


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