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: target-specific way to make ld -N the default


Nick Clifton writes:
 > Hi Doug,
 > 
 > > In the meantime there is LDEMUL_BEFORE_PARSE.
 > > I see the mmix port is already making an attempt at this:
 > > 
 > > static void
 > > elfmmix_before_parse ()
 > > {
 > >   gld${EMULATION_NAME}_before_parse ();
 > > 
 > >   /* Make sure we don't create a demand-paged executable.  Unfortunately
 > >      this isn't changeable with a command-line option.  It makes no
 > >      difference to mmo, but the sections in elf64mmix will be aligned to a
 > >      page in the linked file, which is non-intuitive.  If there's ever a
 > >      full system with shared libraries and demand paging, you will want to
 > >      exclude this file.  */
 > >   config.magic_demand_paged = false;
 > > }
 > 
 > I rather like this solution.  It lets individual targets make up their
 > own minds about the default without requiring the rather clumsy
 > definition of EMBEDDED or (shudder, grin) REALLY_EMBEDDED.  The only
 > problem is the lack of a way to override the default "-N" behaviour
 > from the command line, and solving that is easy:

I dunno if I'd call it cleaner.
"no room for program headers" (and program headers in general) seem
absolutely bogus for embedded targets.  We can't break existing code
so we can't just make -N the default if EMBEDDED, but all else being equal,
that feels much cleaner than having every embedded target
start providing foo_before_parse routines (which methinks
is really just a workaround to an oversight made way back when).


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