Add -N support to ELF?

H.J. Lu hjl@nynexst.com
Mon Feb 20 10:32:00 GMT 1995


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.




More information about the Gas2 mailing list