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]

Re: linker functionality


On Mon, Feb 26, 2001 at 09:21:53AM -0500, Timothy Wall wrote:
> Ian Lance Taylor wrote:
> 
> > Timothy Wall <twall@cygnus.com> writes:
> >
> > > I'm planning to add a target-specific patch to the linker to (minimally)
> > > emit a warning when relocations are found in read-only (lit shared)
> > > sections (since they're not supported by the target).  Is there any
> > > comparable functionality already existing that I should be aware of?
> >
> > You should be aware of the `-assert pure-text' option used on SunOS
> > and the `-z text' option used on Solaris.  This would appear to have a
> > similar meaning to what you describe, but are currently ignore by the
> > GNU linker.  If they are indeed what you describe, then I suggest
> > implementing them, rather than adding a new option.
> >
> > Ian
> 
> Well, considering that relocs in text cause an abort at runtime, this would
> always be active for this particular target, and wouldn't be implemented as
> an option.  Thanks for the input, though.
> 

Why not? For what I know, the `-z text' option is handled by the ELF linker.
I added

ld: emulation specific options:
elf_i386: 
  --disable-new-dtags   Disable new dynamic tags
  --enable-new-dtags    Enable new dynamic tags
  -z initfirst          Mark DSO to be initialized first at runtime
  -z interpose          Mark object to interpose all DSOs but executable
  -z loadfltr           Mark object requiring immediate process
  -z nodefaultlib       Mark object not to use default search paths
  -z nodelete           Mark DSO non-deletable at runtime
  -z nodlopen           Mark DSO not available to dlopen
  -z nodump             Mark DSO not available to dldump
  -z now                Mark object non-lazy runtime binding
  -z origin             Mark object requiring immediate $ORIGIN processing
                          at runtime
  -z KEYWORD            Ignored for Solaris compatibility


You can make `-z text' default for your target and don't provide a way to
turn it off. I can add `-z text' to ELF with your change :-).

-- 
H.J. Lu (hjl@valinux.com)


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