Add -N support to ELF?

Ian Lance Taylor
Mon Feb 20 14:03:00 GMT 1995

   From: (H.J. Lu)
   Date: Mon, 20 Feb 95 16:18:38 EST

   This patch is derived from some patch I got, Eric? It should work
   fine. Ian, is that ok to uncomment my patch to with this one
   applied? I guess the docs should be updated to reflect the usage
   of -N in ELF.

The basic problem with this approach is that I believe it will cause
the linker to unexpectedly abort if, say, one of the input files has a
writable .text section.  Try it.

The linker already aborts unexpectedly far too often, and I would
prefer not to introduce another possibility.  If you can write the
patch in such a fashion that it can not cause a linker abort--perhaps
by making it retry the division of sections into segments if the first
attempt uses too many segments--I would be more willing to put this
in.  The beneficial effects of this patch are vanishingly small--it
saves one page of virtual memory address space (not virtual memory
itself, but just the address space) for a very small number of
programs--so IMHO it should only be put in if it is completely safe.


More information about the Gas2 mailing list