This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: weak symbol sizing
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nick Clifton <binutils at sources dot redhat dot com>
- Date: Wed, 27 Jul 2005 09:38:43 +0930
- Subject: Re: weak symbol sizing
- References: <20050726151931.GI13611@bubble.grove.modra.org> <42E661FE.9070904@sources.redhat.com>
On Tue, Jul 26, 2005 at 05:17:02PM +0100, Nick Clifton wrote:
> Can you create a testcase from this as well ?
* ld-elfweak/size2a.s: Extend test to check size for two weaks.
* ld-elfweak/size2b.s: Likewise.
* ld-elfweak/size2.d: Update.
Index: ld/testsuite/ld-elfweak/size2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfweak/size2.d,v
retrieving revision 1.1
diff -u -p -r1.1 size2.d
--- ld/testsuite/ld-elfweak/size2.d 5 May 2005 03:11:24 -0000 1.1
+++ ld/testsuite/ld-elfweak/size2.d 27 Jul 2005 00:05:46 -0000
@@ -4,5 +4,7 @@
#readelf: -s
Symbol table '.symtab' contains .* entries:
#...
- .*: [0-9a-f]* *1 *FUNC *GLOBAL *DEFAULT *[0-9] *_start
+ .*: [0-9a-f]* +1 +FUNC +GLOBAL +DEFAULT +[0-9] +_start
+#...
+ .*: [0-9a-f]* +1 +FUNC +WEAK +DEFAULT +[0-9] +foo
#...
Index: ld/testsuite/ld-elfweak/size2a.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfweak/size2a.s,v
retrieving revision 1.1
diff -u -p -r1.1 size2a.s
--- ld/testsuite/ld-elfweak/size2a.s 5 May 2005 03:11:24 -0000 1.1
+++ ld/testsuite/ld-elfweak/size2a.s 27 Jul 2005 00:05:46 -0000
@@ -4,3 +4,9 @@
_start:
.byte 0
.size _start, 1
+
+ .weak foo
+ .type foo, "function"
+foo:
+ .byte 0
+ .size foo, 1
Index: ld/testsuite/ld-elfweak/size2b.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfweak/size2b.s,v
retrieving revision 1.1
diff -u -p -r1.1 size2b.s
--- ld/testsuite/ld-elfweak/size2b.s 5 May 2005 03:11:24 -0000 1.1
+++ ld/testsuite/ld-elfweak/size2b.s 27 Jul 2005 00:05:46 -0000
@@ -5,3 +5,10 @@ _start:
.byte 0
.byte 0
.size _start, 2
+
+ .weak foo
+ .type foo, "function"
+foo:
+ .byte 0
+ .byte 0
+ .size foo, 2
--
Alan Modra
IBM OzLabs - Linux Technology Centre