This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: GOLD: Add support for MEMORY regions in linker scripts
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, binutils at sourceware dot org
- Date: Wed, 8 Sep 2010 11:25:44 -0700
- Subject: Re: RFC: GOLD: Add support for MEMORY regions in linker scripts
- References: <m3r5ht5ytt.fsf@redhat.com> <mcraaoh47pw.fsf@google.com> <4C7FA9F6.2060600@redhat.com> <mcrlj7ci6n2.fsf@google.com> <4C87B68E.3040206@redhat.com>
On Wed, Sep 8, 2010 at 9:15 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Ian,
>
>>> > + extern void
>>> > + script_add_memory(void*, const char*, size_t, unsigned int,
>>> > Expression_ptr, Expression_ptr);
>>
>> Line too long.
>
> Fixed. ?I found a couple of other places where I had lines of over 80
> characters, so I fixed those as well. ?There were two lines that I did not
> fix however: ?script-sections.cc lines 3207 and 3219. ?I am not sure what to
> do here. ?Should the lines be split at a point of indirection, or should
> they be left as-is ? ?For example this is line 3207:
>
> ? ? ?(*s)->get_output_section()->current_data_size(),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
> ? ? ? ? ? ? ? ? ? 80-char-limit-is-here-^
>
>
>>> > + ? ? ? case 'R':
>>> > + ? ? ? case 'r':
>>> > + ? ? ? attributes |= MEM_READABLE; break;
>>
>> It's hard to tell in the diff format, but I'm not sure the indentation
>> is correct here. ?The statements after the case labels should be
>> indented by two spaces.
>
> They were like that - it was just the way that the tabs were behaving in the
> patch.
>
> Committed.
It failed to build on Fedora 13/x86-64:
cc1plus: warnings being treated as errors
/export/gnu/import/git/binutils/gold/script-sections.cc: In member
function ‘void gold::Script_sections::add_memory_region(const char*,
size_t, unsigned int, gold::Expression*, gold::Expression*)’:
/export/gnu/import/git/binutils/gold/script-sections.cc:2791: error:
field precision should have type ‘int’, but argument 2 has type
‘size_t’
make[6]: *** [script-sections.o] Error 1
--
H.J.