Re: fake symbols to aid debugging

Nick Clifton
2003-07-29T06:50:47Z

Hi Alan,

> I waste enough time doing this that I figure it's worth doing something
> about it. My first idea, already implemented, was to have the linker
> emit extra symbols to identify the stubs. This works well but bloats
> the symbol table and isn't on by default. A better idea would be to
> create the stub symbols on the fly. With that in mind, I propose to
> add two new bfd functions
>
> long bfd_get_fake_symtab_upper_bound (bfd *abfd);
> long bfd_canonicalize_fake_symtab (bfd *abfd, asymbol **buf);
>
> analogous to bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
>
> Comments?

Well a few questions actually:

Where would these fake symbols be held ? In a new .fakesymtab
section? Or are they entirely ephemeral and never stored in the
executable ?

Can the fake symbols be generated after the stubs are created ? ie
can they be created for already existing libraries/executables ?

Would gdb users be able to set breakpoints on these fake symbols ?

Cheers
Nick