This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Add -N support to ELF?


I have been thinking to add -N support to ELF. The current ELF code
will put all sections into one segment if it can. It somewhat works
like -N. If the text section ends on a page boundary and the data
section starts right after it, both sections will be put into one 
big segment. That means the binary may not be sharable. The current
solution is skip a page if that happens. I was wondering if we
could change it such that:

1. When -N is not used, if the sh_flags of the current section
   is not compatible with the p_flags of the current segment, start
   a new segment.

2. When -N is used, behave just like the old way.

I can make the changes. But I don't think may changes will be
acceptable to everyone :-(. Will a new field in bfd_link_info help?

Thanks.

H.J.