Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Matthew Wilcox <Matthew.Wilcox@genedata.com>
Cc: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] binfmt_som
Date: Sun, 13 Jun 1999 00:40:06 -0600	[thread overview]
Message-ID: <24471.929256006@upchuck.cygnus.com> (raw)
In-Reply-To: Your message of Sun, 13 Jun 1999 03:52:54 +0200. <19990613035254.D31472@mencheca.ch.genedata.com>


  In message <19990613035254.D31472@mencheca.ch.genedata.com>you write:
  > ``exec_dsize
  > This field specifies the size in bytes of the initialised data (does
  > not have to be a multiple of 4k).  The actual size of the data section
  > in the file must be a multiple of 4k and can be padded with zeroes to
  > make it a multiple of 4k.''
  > 
  > Does this mean in the case where exec_dsize is not a multiple of 4k, it
  > MUST be padded with zeroes, or merely might be padded with zeroes?  If the
  > former, I don't need to zero them myself in the loader which would be nice.
Strictly reading the size in the file is guaranteed to be a multiple of 4k,
but you can't necessarily depend on the pad being zero filled.

However, HP's linker always zero pads.

  > Also, where does the bss section start?  Is it immediately after the
  > initialised data or at the next page boundary after it?
It beings immediately after the initialized data.  Note that HP's linker will
decrease the size of the bss space by the amount of pad needed to fill out the
data space's size to a multiple of 4k.  This saves a little bit of memory in
the resident image.  Note this is only possible when the pad is zero filled.

To the best of my knowledge this behavior is not documented by HP anywhere.  It
is documented in bfd/som.c, as are many of SOM's wonderful quirks.  Search for
exec_header.

In case you're wondering why BFD has to know about this -- consider strip and
objcopy.  If you muck up an executable with those programs BFD has to be
able to recreate the exec header based on the sections that will exist in the
final output file.

jeff

  reply	other threads:[~1999-06-13  6:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-13  1:52 [parisc-linux] binfmt_som Matthew Wilcox
1999-06-13  6:40 ` Jeffrey A Law [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-06-03 17:57 Matthew Wilcox
1999-05-30 23:09 Matthew Wilcox
1999-05-31  0:11 ` Mark Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24471.929256006@upchuck.cygnus.com \
    --to=law@cygnus.com \
    --cc=Matthew.Wilcox@genedata.com \
    --cc=parisc-linux@thepuffingroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox