[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/273] FAIL: size -A
From: |
dave at hiauly1 dot hia dot nrc dot ca |
Subject: |
[Bug binutils/273] FAIL: size -A |
Date: |
28 Jul 2004 15:21:46 -0000 |
------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca
2004-07-28 15:21 -------
Subject: Re: FAIL: size -A
> > I'm wondering if spaces should included in the total.
>
> For relocatable objects ? Presumably computing a size that is too big
> is preferable to one one that is too small, (with the assumption that
> the correct size will be computed when the final link is performed), so
> I would think that allowing extra space for possible alignment would be
> a good idea.
That's reasonable. However, I was concerned about a different issue.
Here is the current output for size -A with bintest.o:
-bash-2.05b$ ./size -A tmpdir/bintest.o
tmpdir/bintest.o :
section size addr
$TEXT$ 8 0
$CODE$ 8 0
$LIT$ 0 0
$MILLICODE$ 0 0
$PRIVATE$ 8 0
$DATA$ 8 0
$BSS$ 0 0
Total 32
The problem with the total is that we are double counting. The $CODE$,
$LIT$ and $MILLICODE$ subspace make up the space $TEXT$. $DATA$ and
$BSS$ make up the space $PRIVATE$. Here are the details:
Space dictionary for tmpdir/bintest.o:
Ind LDPIT Sort Space Subspaces Ldr Fixups Init Ptrs Name
0 LD... 8 0 0 3 -1 0 -1 0 $TEXT$
1 LDP.. 16 1 3 2 -1 0 -1 0 $PRIVATE$
Subspace dictionary for tmpdir/bintest.o:
Sub Sp AC RDCLQIOENKT Key Loc/Init InitLn Start Len Align Fixups Name
0 0 2c ...L0.O.... 24 000001ec 000008 00000000 000008 8 0 3 $CODE$
1 0 2c ...L0...... 16 000001f4 000000 00000000 000000 8 3 0 $LIT$
2 0 2c ...L0...... 8 000001f4 000000 00000000 000000 8 3 0
$MILLICODE$
3 1 1f ...L1...... 24 000001f4 000008 00000000 000008 8 3 1 $DATA$
4 1 1f ...L1...... 80 00000000 000000 00000000 000000 8 -1 0 $BSS$
The manpage for size shows the following output for -A:
$ size --format=SysV ranlib size
ranlib :
section size addr
.text 294880 8192
.data 81920 303104
.bss 11592 385024
Total 388392
The closest SOM approximation would be:
-bash-2.05b$ ./size -A tmpdir/bintest.o
tmpdir/bintest.o :
section size addr
$TEXT$ 8 0
$PRIVATE$-$BSS$ 8 0
$BSS$ 0 0
Total 16
This what we get with -B:
-bash-2.05b$ ./size -B tmpdir/bintest.o
text data bss dec hex filename
8 8 0 16 10 tmpdir/bintest.o
There is one other standard space, $THREAD_SPECIFIC$. It contains the
subspace $TBSS$. Of course, users can define their own spaces and
subspaces if they want.
Dave
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=273
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/273] FAIL: size -A, (continued)
- [Bug binutils/273] FAIL: size -A, nickc at redhat dot com, 2004/07/23
- [Bug binutils/273] FAIL: size -A, dave at hiauly1 dot hia dot nrc dot ca, 2004/07/23
- [Bug binutils/273] FAIL: size -A, nickc at redhat dot com, 2004/07/26
- [Bug binutils/273] FAIL: size -A, dave at hiauly1 dot hia dot nrc dot ca, 2004/07/26
- [Bug binutils/273] FAIL: size -A, nickc at redhat dot com, 2004/07/27
- [Bug binutils/273] FAIL: size -A, dave at hiauly1 dot hia dot nrc dot ca, 2004/07/27
- [Bug binutils/273] FAIL: size -A, nickc at redhat dot com, 2004/07/28
- [Bug binutils/273] FAIL: size -A,
dave at hiauly1 dot hia dot nrc dot ca <=
- [Bug binutils/273] FAIL: size -A, nickc at redhat dot com, 2004/07/29
- [Bug binutils/273] FAIL: size -A, dave at hiauly1 dot hia dot nrc dot ca, 2004/07/29