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: about .interp


Hi Yu,

: > 1. what's the files under "binutils-2.9/ld/ldscripts for?
: >    it seems they are scripts for ld,but where and when "ld"
: >    uses them?
: 
: They are scripts for ld.  You most likely are using a version of ld
: that has these scripts built in, so the on-disk copies aren't used.
: If you want ld to use a modified script, use -T.

They are versions of the default script which is built in to the
linker.  The linker will alter its built in script if certain command
line options are used, and the scripts in this directory show the
variations that will be implemented.  The extenstion indicates which
command line switch will invoke that script:

  # A .x script file is the default script.
  # A .xr script is for linking without relocation (-r flag).
  # A .xu script is like .xr, but *do* create constructors (-Ur flag).
  # A .xn script is for linking with -n flag (mix text and data on same page).
  # A .xbn script is for linking with -N flag (mix text and data on same page).
  # A .xs script is for generating a shared library with the --shared
  #   flag;

You can also see the variations by diff the output of 'ld --verbose'
with and without one of those command line flags.

Cheers
	Nick


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