This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, gdbserver] Further cleanup of FDPIC/DSBT divergences
- From: Pedro Alves <palves at redhat dot com>
- To: lgustavo at codesourcery dot com
- Cc: Yao Qi <yao at codesourcery dot com>, "'gdb-patches at sourceware dot org'" <gdb-patches at sourceware dot org>, Mike Frysinger <vapier at gentoo dot org>
- Date: Mon, 12 Aug 2013 15:06:21 +0100
- Subject: Re: [PATCH, gdbserver] Further cleanup of FDPIC/DSBT divergences
- References: <51C34F14 dot 8070803 at codesourcery dot com> <51C84CBD dot 10506 at codesourcery dot com> <51C84DD4 dot 4090001 at codesourcery dot com> <5203CA36 dot 5000206 at codesourcery dot com> <520505D9 dot 8080103 at redhat dot com> <520524D8 dot 40408 at codesourcery dot com> <52058A17 dot 2050101 at codesourcery dot com> <5208E601 dot 6070000 at codesourcery dot com>
On 08/12/2013 02:41 PM, Luis Machado wrote:
>>> +
>>> + /* Fetch the DSBT_INDEX from the shared library file on disk. */
>>> + if (scan_dyntag_in_bfd (DT_TIC6X_DSBT_INDEX, solib_bfd, &addr) == 0)
>>
>> I don't find the definition of DT_TIC6X_DSBT_INDEX. In uclibc, I only
>> find DT_C6000_DSBT_INDEX.
>>
>
> That is exactly what it is. I named it DT_TIC6X_DSBT_INDEX to make it
> more meaningful, but i can use DT_C6000_DSBT_INDEX without problems i think.
Indeed. The kernel (arch/c6x/include/asm/elf.h) has:
85 /* C6X specific DT_ tags */
86 #define DT_C6000_DSBT_BASE 0x70000000
87 #define DT_C6000_DSBT_SIZE 0x70000001
88 #define DT_C6000_PREEMPTMAP 0x70000002
89 #define DT_C6000_DSBT_INDEX 0x70000003
BFD also already has (include/elf/tic6x.h):
/* The hard-coded DSBT index for this module, if any. */
#define DT_C6000_DSBT_INDEX 0x70000003
IMO, yes, better stick with existing practice and not
invent new symbols.
--
Pedro Alves