public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: loody <miloody@gmail.com>
To: amodra@gmail.com, binutils@sourceware.org
Subject: Re: some question about output section
Date: Thu, 05 May 2011 03:00:00 -0000	[thread overview]
Message-ID: <BANLkTi=Vc2NMKesCBWeeBHyHwqMcLWnumg@mail.gmail.com> (raw)
In-Reply-To: <20110505003450.GD7018@bubble.grove.modra.org>

hi:

2011/5/5 Alan Modra <amodra@gmail.com>:
> On Wed, May 04, 2011 at 11:51:24PM +0800, loody wrote:
>> right? (I thought archive here in document means real folder)
>
> It means what it says.  An archive is a file created by "ar", not
> a directory/folder.
Thank you.
it seems I misunderstand the meaning of "archive" in the document. :P
So I change the script as below:

OUTPUT_ARCH(mips)
SECTIONS
{
  .onlyText 0x80000000 : {  lib2.a:*.o (*.text)  }
}

OUTPUT_ARCH(mips)
SECTIONS
{
  .onlyText 0x80000000 : {  lib2.a: (*.text)  }
}

and link command as:
mipsel-linux-gnu-ld -Bstatic -T ./link.xn -o TEST_LINK.elf -Map
TEST_LINK.map --oformat elf32-tradlittlemips lib2.a

but I still cannot see the section I named in the script file shows up
in final elf.

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .shstrtab         STRTAB          00000000 000034 00001b 00      0   0  1
  [ 2] .symtab           SYMTAB          00000000 0000f0 000010 10      3   1  4
  [ 3] .strtab           STRTAB          00000000 000100 000001 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

below is the content of lib2.a
#nm lib2.a

sdc.o:
0000002c T DRV_SDC_CardStatus_Inserted
0000003c T DRV_SDC_SysInit
00000400 T MOVE_BOOT_CODE_BY_SOFTWARE
0000052c T MOVE_BOOT_CODE_BY_SOFTWARE_With_Setting
         U OS_DelayTime
000000a4 T SDC_CMD0_With_ARG
000000e4 T SDC_InitClock
000001c0 T SDC_ReadSector_Boot
00000000 T _SDC_PowerOn
00000000 b dwClkDivisor
00000014 T Enter
         U inv_dcache_range

-- 
Regards,

  reply	other threads:[~2011-05-05  3:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 15:29 loody
2011-04-28  0:57 ` Alan Modra
2011-04-28 16:17   ` loody
2011-04-29  0:32     ` Alan Modra
2011-05-01 13:21       ` loody
2011-05-04 15:51         ` loody
2011-05-05  0:35           ` Alan Modra
2011-05-05  3:00             ` loody [this message]
2011-05-05  3:57               ` Alan Modra
2011-05-11  6:27                 ` loody
2011-05-11  7:18                   ` Alan Modra
2011-05-11  8:12                     ` loody
2011-05-18  5:32                     ` loody
2011-05-19  4:31                       ` loody

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='BANLkTi=Vc2NMKesCBWeeBHyHwqMcLWnumg@mail.gmail.com' \
    --to=miloody@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /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).