This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Error: can't resolve `0' {*UND* section} - `__DTOR_LIST__' {.dtors section}
- From: Alan Modra <amodra at gmail dot com>
- To: William Tambe <tambewilliam at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 8 Jul 2019 11:09:34 +0930
- Subject: Re: Error: can't resolve `0' {*UND* section} - `__DTOR_LIST__' {.dtors section}
- References: <CAF8i9mNzz49V9epg5ajHL1jY1X2GVw+awo_d7PYw6CRZ2Mv+Ng@mail.gmail.com>
On Sat, Jul 06, 2019 at 04:55:20PM -0500, William Tambe wrote:
> I have a gcc port that yield the following assembly to negate a
> register by an immediate:
> inc %11, -__DTOR_LIST__
> In the above assembly example, register %11 is to be decremented by
> __DTOR_LIST__ where __DTOR_LIST__ is a label.
>
> To parse the immediate portion of the above assembly, the
> corresponding gas port use the function parse_exp_save_ilp(); however
> it yields the following error:
>
> Error: can't resolve `0' {*UND* section} - `__DTOR_LIST__' {.dtors section}
>
> parse_exp_save_ilp() is not able to evaluate an expression in which
> the negation operator precede a symbol.
The problem isn't there but rather in expecting that a relocatable
assembler should be able to negate a section relative symbol. To do
that your target must be able to emit relocations that handle
negation of their symbols.
--
Alan Modra
Australia Development Lab, IBM