This is the mail archive of the
mailing list for the binutils project.
Re: LD scripts - using expressions correctly
- From: David Paterson <dnpaterson at gmail dot com>
- To: David Paterson <dnpaterson at gmail dot com>, binutils at sourceware dot org
- Date: Tue, 8 Jul 2014 09:33:20 +0100
- Subject: Re: LD scripts - using expressions correctly
- Authentication-results: sourceware.org; auth=none
- References: <CAM1kHc0THfgon+8dJz7i3DXwZvwChZDjkkkK1-42=5ipYG1fYA at mail dot gmail dot com> <20140707135622 dot GG8039 at bubble dot grove dot modra dot org> <CAM1kHc3zDUTLxZcZxL=QMCgf=XM4N8o9yCCDONdMRx8GSY17Xw at mail dot gmail dot com> <20140707143645 dot GK8039 at bubble dot grove dot modra dot org> <CAM1kHc3oJ4s17d5tAYAeD8eKCHD-YimzcNotmhBOjoXzRdprHw at mail dot gmail dot com> <CAM1kHc1_iECOy0GXw-vA+7X-KXAgya4qvn3QBZvaMtFpTA=5dw at mail dot gmail dot com>
OK - I have no idea why I can't get it to build (HAVE_LIMITS_H is
definitely defined via the configure step) but that's a problem for
Re the expressions problem, I tried using Alan's re-written version
and it works perfectly when using the current version (2.24) of
Binutils. A bit of experimenting seems to show that it's the "+="
operator that's up to mischief so I've removed all uses of it from my
scripts, and they're working fine now.
Thanks to Alan for his help, and remember folks, when using LD, just
say "No!" to += :-)
On 7 July 2014 16:10, David Paterson <email@example.com> wrote:
> Hmmm, build failure :-
> .../libiberty/fibheap.c:38:24: error: 'LONG_MIN
> ' undeclared (first use in this function)
> #define FIBHEAPKEY_MIN LONG_MIN
> I'm not sure if it's something wrong in my build environment (MinGW)
> or my configure settings, or something else, but I'll perhaps try
> working back to earlier versions and see how it goes.
> AT least I know there's likely a fix for my original problem.
> On 7 July 2014 15:46, David Paterson <firstname.lastname@example.org> wrote:
>> Thanks. I'm building at the moment and should be able to test that in
>> a little while :-)
>> On 7 July 2014 15:36, Alan Modra <email@example.com> wrote:
>>> On Mon, Jul 07, 2014 at 03:06:45PM +0100, David Paterson wrote:
>>>> I should have mentioned I'm using 2.24, but I'll pull the latest
>>>> version from GIT and try that.
>>> If mainline works for you, then I expect fa72205c was the patch that
>>> fixed your trouble. Which also means you can work around this by
>>> _textVMA = (_exec_rom > 0) ? _textLMA : _ram_start;
>>> _textVMA += _textoffset;
>>> _textVMA = ((_exec_rom > 0) ? _textLMA : _ram_start) + _textoffset;
>>> Alan Modra
>>> Australia Development Lab, IBM