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] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes


On Thu, 29 Oct 2015 21:25:09 -0700
Kevin Buettner <kevinb@redhat.com> wrote:

> Some of the tests in gdb.dwarf2 which use Dwarf::assemble refer to
> (minimal/linker) symbols created in the course of building a small
> test program.  Some targets use a prefix such as underscore ("_") on
> these symbols.  Many of the tests in gdb.dwarf2 do not take this into
> account.  As a consequence, these tests fail to build, resulting
> either in failures or untested testcases.

Several of the .S files in gdb.dwarf2 have the same problem.  E.g.
when linking the test case for gdb.dwarf2/method-ptr.exp, I see a
linker error "undefined reference to `main'".  It appears that crt0
is generating a reference to _main, but the .S file only provides a
reference to main.

Any thoughts on what to do about this?

(It occurs to me that I could define both _main and main in the .S
file, but this doesn't solve the problem should some other prefix be
used instead.)

Kevin


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