This is the mail archive of the binutils@sourceware.org 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]

Help text for ld magic number options


Thanks, Alan, for addressing bug 25569 more thoroughly than I would be
able to do.

To all, next I have three proposed changes related to the magic number
options for ld on which I solicit your feedback.  First a simple one.

The output of ld --help includes the following:

  -n, --nmagic     Do not page align data
  -N, --omagic     Do not page align data, do not make text readonly
  --no-omagic      Page align data, make text readonly

The help text for --nmagic is not accurate for the pdp11-aout target
and I believe not for others as well.  That option results in setting
config.text_read_only = TRUE, and in order to make the text read-only
the data must be aligned to a separate page on the PDP11 and I presume
for most if not all other computers as well.

The references to page alignment really correspond to the setting of
config.magic_demand_paged which, when TRUE, selects the ZMAGIC (0413)
format in aoutx.h.  That format does require the data to be page
aligned, but more significantly it indicates to the runtime system to
do demand paging.  The pdp11-aout code in bfd/pdp11.c does not
implement the ZMAGIC format (even though there is some stub code for
it included when copying from aoutx.h) since demand paging isn't
practical on the PDP11 and wasn't implemented for it over the full
timespan from Unix v6 through 2.11 BSD.  Thus, for pdp11-aout the
options --no-omagic and --nmagic produce the same result.

I propose that the help text be changed as follows:

  -n, --nmagic     Make text readonly, page align data, no demand paging
  -N, --omagic     Do not make text readonly, do not page align data
  --no-omagic      Make text readonly, page align data, do demand paging

Is that acceptable?  This would have implications for the ld
documentation as well.

                                                        -- Steve


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