This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] fix underfined Thumb symbols (try 2)
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Wed, 6 Sep 2006 13:07:40 +0400
- Subject: [PATCH] fix underfined Thumb symbols (try 2)
Hello!
some time ago I sent a patch that stops binutils from settings low bit of ARM
Thumb external symbols, see:
http://sources.redhat.com/ml/binutils/2006-06/msg00273.html
That patch was approved and committed, but after that I've discovered that
the patch had one line wrong, so new code had no effect, and the new test just
failed.
I'm not sure how that happened, for I see the test pass locally, maybe it was
some merge glitch. I apologise, and send a followup patch that sets
everything right. I've verified that mainline builds with this patch and that
the test in question now passes, and that there are no regressions.
I've no write access; if approved I'd also appreciate committing this patch
for me.
Thanks,
Volodya
bfd/
2006-09-04 Vladimir Prus <vladimir@codesourcery.com>
* elf32-arm.c (elf32_arm_swap_symbol_out): Remove
unconditional setting of low bit for Thumb symbol
mistakenly left behind after check for external
symbols was added.
ld/testsuite/
2006-09-04 Vladimir Prus <vladimir@codesourcery.com>
* ld-arm/use-thumb-lib.sym: Use regexps instead of
absolute addresses, for robustness.
? arm_thumb_externals_mainline.diff
Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.88
diff -u -p -r1.88 elf32-arm.c
--- bfd/elf32-arm.c 4 Sep 2006 07:11:11 -0000 1.88
+++ bfd/elf32-arm.c 6 Sep 2006 08:59:37 -0000
@@ -9391,8 +9391,6 @@ elf32_arm_swap_symbol_out (bfd *abfd,
*/
newsym.st_value |= 1;
}
-
- newsym.st_value |= 1;
src = &newsym;
}
Index: ld/testsuite/ld-arm/use-thumb-lib.sym
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/use-thumb-lib.sym,v
retrieving revision 1.2
diff -u -p -r1.2 use-thumb-lib.sym
--- ld/testsuite/ld-arm/use-thumb-lib.sym 20 Jun 2006 13:55:08 -0000 1.2
+++ ld/testsuite/ld-arm/use-thumb-lib.sym 6 Sep 2006 08:59:39 -0000
@@ -1,15 +1,16 @@
Symbol table for image:
Num Buc: Value Size Type Bind Vis Ndx Name
- 11 0: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS _edata
- 10 0: 00000268 20 FUNC GLOBAL DEFAULT 6 foo
- 4 0: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__
- 12 1: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS _end
- 7 1: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__
- 5 1: 0000027c 0 NOTYPE GLOBAL DEFAULT ABS __exidx_start
- 13 2: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS __data_start
- 9 2: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS __end__
- 8 2: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
+ 11 0: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS _edata
+ 10 0: [0-9a-f]* 20 FUNC GLOBAL DEFAULT 6 foo
+ 4 0: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__
+ 12 1: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS _end
+ 7 1: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__
+ 5 1: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __exidx_start
+ 14 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __data_start
+ 13 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS _stack
+ 9 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __end__
+ 8 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
6 2: 00000000 2 FUNC GLOBAL DEFAULT UND lib_func2
- 3 2: 0000830c 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__
- 2 2: 0000027c 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end
+ 3 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__
+ 2 2: [0-9a-f]* 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end