RFC: GOLD: Add support for MEMORY regions in linker scripts

H.J. Lu hjl.tools@gmail.com
Wed Sep 8 18:25:00 GMT 2010


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.



More information about the Binutils mailing list