This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] allow -G to take a range


> Note, if alignment holes are a big space waster, three thoughts come
> to mind.  One, use .sdata1 sections for 1 byte aligned items, and
> .sdata2 for 2 byte aligned items.  Obviously this can't be done
> under ECOFF, with its fixed section names.

I'm working on a solution like that also.  The problem is that not all
linker scripts (assuming custom linker scripts) will support the new
section names, so it won't be a solution for everyone.

> The second thought is to have the linker sort items in a section
> based on alignment.  This works for common variables created by the
> linker, but less well for initialized variables that are just
> plunked into the current .sdata section.

This doesn't work for initialized data, but I'm working on that too.
It would require gcc's support for initialized data.

> The third thought would be to have the compiler not put things like
> strings & constants in the .sdata/.lit* sections.

I'll add that to the list of things to investigate.  Thanks!

> Off hand, I suspect that there are few 8-bit and 16-bit aligned
> items other than small character strings.

I don't know what to expect in .sdata, which is why I'm looking at a
number of options.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]