This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 29 Oct 2015 22:25:05 -0700
- Subject: Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes
- Authentication-results: sourceware.org; auth=none
- References: <20151029212509 dot 438b5642 at pinnacle dot lan>
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