From: "PRC" <panruochen@gmail.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: pkoning <pkoning@equallogic.com>, binutils <binutils@sourceware.org>
Subject: Re: Re: Re: How to inform the linker not to produce any data for a.bsssection?
Date: Tue, 18 Dec 2007 10:19:00 -0000 [thread overview]
Message-ID: <200712181818332958067@gmail.com> (raw)
In-Reply-To: <20071211125855.GA25143@caradoc.them.org>
Hi, Jacobowitz
Can you tell me how to modify the link script to prevent .bss taking up space in file?
I didn't grap your meanings and have no idea what to do.
On Tue, Dec 11, 2007 at 09:19:12AM +0800, PRC wrote:
> mips-elf-objdump -h a.out
> -------------------------------------------------------------------
> 3 .bss 00010620 81413898 81413898 00003898 2**3
> ALLOC
> 4 .reginfo 00000018 00000000 00000000 00013eb8 2**2
> CONTENTS, READONLY, LINK_ONCE_SAME_SIZE
> ------------------------------------------------------------------
> The difference between sections ".bss" and ".reginfo" is almost 64K,
> which is just the size of the buffer `cmd_buffer`. And I check the
> output file, and find there are lots of zero starting from the offset
> 0x3898. It seems the linker puts 64K zeros in the section ".bss".
This is necessary alignment. If you don't want .bss to take up space
in the file, do not put allocated sections after it.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-18 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-09 2:51 How to inform the linker not to produce any data for a .bss section? PRC
2007-12-09 20:07 ` Daniel Jacobowitz
2007-12-11 1:19 ` Re: How to inform the linker not to produce any data for a .bsssection? PRC
2007-12-11 12:59 ` Daniel Jacobowitz
2007-12-12 9:08 ` Dave Murphy
2007-12-12 14:19 ` Daniel Jacobowitz
2007-12-18 10:19 ` PRC [this message]
2007-12-18 11:34 ` Re: Re: How to inform the linker not to produce any data for a.bsssection? Ivan Pulleyn
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=200712181818332958067@gmail.com \
--to=panruochen@gmail.com \
--cc=binutils@sourceware.org \
--cc=drow@false.org \
--cc=pkoning@equallogic.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).