* Stopping GAS from resolving IFUNC symbols itself
@ 2010-11-30 14:28 Richard Sandiford
2010-12-01 4:09 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2010-11-30 14:28 UTC (permalink / raw)
To: binutils
One problem I've hit while working on the ARM STT_GNU_IFUNC support is
that things like:
.type foo,%gnu_indirect_function
foo:
...
.size foo,.-foo
...
.4byte foo-. # still in same section as foo
get resolved at assembly time, and don't produce a relocation.
This situtation probably doesn't occur in practice for x86 and x86_64.
The reloc would generally be in a read-only data section rather than in
.text itself, and in that situation, gas does of course produce a
relocation. References from the same section could reasonably be used
in ARM constant tables though.
I think this points to a more general bug: we're treating references to
indirect function symbols in the same way that we treat references to
weak and (on ELF targets) global symbols. They seem fundamentally
different though. If the assembler sees something like:
.globl foo
foo:
then it has no idea whether the user wants to be able to override
foo or not. The final link might not even be dynamic. So if the
code also contains:
.globl bar
bar:
.4byte bar - foo
then the assembler should resolve foo locally rather than emit
a fatal error.
The weak case is less obvious, but there are cases where it's the same.
A program might optionally link in a file foo.o that defines F. Other
objects might then treat F as weak so that they don't need to be
recompiled depending on the presence of foo.o. But the user might know
that foo.o's F is the only real definition that will ever be used, and a
header file might nevertheless cause foo.o to define F as weak. It would
then be wrong for the assembler to reject "foo - F" in foo.o.
In short, the definition that gas sees for ordinary weak and global
symbols _could_ also be the definition that the linker uses to resolve
relocations. That's never true for ifunc symbols though, because the
linker will use a PLT instead. Gas should never resolve ifunc symbols
itself.
I think this means that S_FORCE_RELOC is wrong: the check for indirect
functions shouldn't be restricted to strict mode. Also, various parts
of GAS assume that locally-defined symbols can always be used. Now that
we have a case where that isn't true, those pieces of code should check
S_FORCE_RELOC as well.
One decision was whether to push these S_FORCE_RELOC checks into
the TC_FORCE_RELOCATION_*s that are missing them (particularly
the SUB ones), or whether to check them in fixup_segment itself.
I went for the latter because I can't see any situation in which
a target would want to override this behaviour.
Patch tested on x86_64-linux-gnu. Since the patch touches only
target-independent code, I intend to commit it in a couple of days
unless there are objections.
Richard
gas/
* symbols.c (S_FORCE_RELOC): Return true for indirect functions
even if !strict.
* expr.c (operand): Don't convert absolute symbols to constants
if S_FORCE_RELOC is true.
(expr): Only reduce subtractions between different symbols if
S_FORCE_RELOC is false for both of them.
* write.c (fixup_segment): Don't remove symbols if S_FORCE_RELOC
is true for them, regardless of their segment.
gas/testsuite/
* gas/i386/ifunc-2.s, gas/i386/ifunc-2.l: New test.
* gas/i386/ifunc-3.s, gas/i386/ifunc-3.d: Likeise.
* gas/i386/i386.exp: Run them.
Index: gas/symbols.c
===================================================================
--- gas/symbols.c 2010-11-29 14:40:49.000000000 +0000
+++ gas/symbols.c 2010-11-29 14:42:36.000000000 +0000
@@ -2052,9 +2052,9 @@ S_FORCE_RELOC (symbolS *s, int strict)
return ((strict
&& ((s->bsym->flags & BSF_WEAK) != 0
- || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
|| (EXTERN_FORCE_RELOC
&& (s->bsym->flags & BSF_GLOBAL) != 0)))
+ || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
|| s->bsym->section == undefined_section
|| bfd_is_com_section (s->bsym->section));
}
Index: gas/expr.c
===================================================================
--- gas/expr.c 2010-11-29 14:40:49.000000000 +0000
+++ gas/expr.c 2010-11-29 14:42:36.000000000 +0000
@@ -1325,7 +1325,9 @@ operand (expressionS *expressionP, enum
/* If we have an absolute symbol or a reg, then we know its
value now. */
segment = S_GET_SEGMENT (symbolP);
- if (mode != expr_defer && segment == absolute_section)
+ if (mode != expr_defer
+ && segment == absolute_section
+ && !S_FORCE_RELOC (symbolP, 0))
{
expressionP->X_op = O_constant;
expressionP->X_add_number = S_GET_VALUE (symbolP);
@@ -1835,7 +1837,9 @@ expr (int rankarg, /* Larger # is highe
#ifdef md_allow_local_subtract
&& md_allow_local_subtract (resultP, & right, rightseg)
#endif
- && (SEG_NORMAL (rightseg)
+ && ((SEG_NORMAL (rightseg)
+ && !S_FORCE_RELOC (resultP->X_add_symbol, 0)
+ && !S_FORCE_RELOC (right.X_add_symbol, 0))
|| right.X_add_symbol == resultP->X_add_symbol)
&& frag_offset_fixed_p (symbol_get_frag (resultP->X_add_symbol),
symbol_get_frag (right.X_add_symbol),
@@ -1949,7 +1953,10 @@ expr (int rankarg, /* Larger # is highe
else if (op_left == O_subtract)
{
resultP->X_add_number -= right.X_add_number;
- if (retval == rightseg && SEG_NORMAL (retval))
+ if (retval == rightseg
+ && SEG_NORMAL (retval)
+ && !S_FORCE_RELOC (resultP->X_add_symbol, 0)
+ && !S_FORCE_RELOC (right.X_add_symbol, 0))
{
retval = absolute_section;
rightseg = absolute_section;
Index: gas/write.c
===================================================================
--- gas/write.c 2010-11-29 14:40:49.000000000 +0000
+++ gas/write.c 2010-11-29 14:57:53.000000000 +0000
@@ -932,6 +932,8 @@ fixup_segment (fixS *fixP, segT this_seg
sub_symbol_segment = S_GET_SEGMENT (fixP->fx_subsy);
if (fixP->fx_addsy != NULL
&& sub_symbol_segment == add_symbol_segment
+ && !S_FORCE_RELOC (fixP->fx_addsy, 0)
+ && !S_FORCE_RELOC (fixP->fx_subsy, 0)
&& !TC_FORCE_RELOCATION_SUB_SAME (fixP, add_symbol_segment))
{
add_number += S_GET_VALUE (fixP->fx_addsy);
@@ -945,6 +947,7 @@ fixup_segment (fixS *fixP, segT this_seg
#endif
}
else if (sub_symbol_segment == absolute_section
+ && !S_FORCE_RELOC (fixP->fx_subsy, 0)
&& !TC_FORCE_RELOCATION_SUB_ABS (fixP, add_symbol_segment))
{
add_number -= S_GET_VALUE (fixP->fx_subsy);
@@ -952,6 +955,7 @@ fixup_segment (fixS *fixP, segT this_seg
fixP->fx_subsy = NULL;
}
else if (sub_symbol_segment == this_segment
+ && !S_FORCE_RELOC (fixP->fx_subsy, 0)
&& !TC_FORCE_RELOCATION_SUB_LOCAL (fixP, add_symbol_segment))
{
add_number -= S_GET_VALUE (fixP->fx_subsy);
@@ -994,6 +998,7 @@ fixup_segment (fixS *fixP, segT this_seg
if (fixP->fx_addsy)
{
if (add_symbol_segment == this_segment
+ && !S_FORCE_RELOC (fixP->fx_addsy, 0)
&& !TC_FORCE_RELOCATION_LOCAL (fixP))
{
/* This fixup was made when the symbol's segment was
@@ -1007,6 +1012,7 @@ fixup_segment (fixS *fixP, segT this_seg
fixP->fx_pcrel = 0;
}
else if (add_symbol_segment == absolute_section
+ && !S_FORCE_RELOC (fixP->fx_addsy, 0)
&& !TC_FORCE_RELOCATION_ABS (fixP))
{
add_number += S_GET_VALUE (fixP->fx_addsy);
Index: gas/testsuite/gas/i386/ifunc-2.s
===================================================================
--- /dev/null 2010-11-23 09:11:06.403484413 +0000
+++ gas/testsuite/gas/i386/ifunc-2.s 2010-11-29 14:50:24.000000000 +0000
@@ -0,0 +1,100 @@
+ .section .text.1,"ax",@progbits
+
+start1:
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start1-bar1
+ .long start1-bar2
+ .long bar1-abs1
+ .long abs1-bar1
+ .long .-bar1
+
+ .type foo1,%gnu_indirect_function
+foo1:
+ ret
+ .size foo1,.-foo1
+
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start1-bar1
+ .long start1-bar2
+ .long bar1-abs1
+ .long abs1-bar1
+ .long .-bar1
+
+ .type bar1,%gnu_indirect_function
+bar1:
+ ret
+ .size bar1,.-bar1
+
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start1-bar1
+ .long start1-bar2
+ .long bar1-abs1
+ .long abs1-bar1
+ .long .-bar1
+
+ .long abs1-abs2
+ .long abs2-abs1
+
+ .equ abs1,0x11223300
+ .type abs1,%gnu_indirect_function
+
+ .long abs1-abs2
+ .long abs2-abs1
+
+ .equ abs2,0x11223380
+ .type abs2,%gnu_indirect_function
+
+ .long abs1-abs2
+ .long abs2-abs1
+
+ .section .text.2,"ax",@progbits
+
+start2:
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start2-bar1
+ .long start2-bar2
+ .long bar2-abs1
+ .long abs1-bar2
+ .long .-bar2
+
+ .type foo2,%gnu_indirect_function
+foo2:
+ ret
+ .size foo2,.-foo2
+
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start2-bar1
+ .long start2-bar2
+ .long bar2-abs1
+ .long abs1-bar2
+ .long .-bar2
+
+ .type bar2,%gnu_indirect_function
+bar2:
+ ret
+ .size bar2,.-bar2
+
+ .long bar1-foo1
+ .long bar2-foo2
+ .long bar1-bar2
+ .long bar2-bar1
+ .long start2-bar1
+ .long start2-bar2
+ .long bar2-abs1
+ .long abs1-bar2
+ .long .-bar2
Index: gas/testsuite/gas/i386/ifunc-2.l
===================================================================
--- /dev/null 2010-11-23 09:11:06.403484413 +0000
+++ gas/testsuite/gas/i386/ifunc-2.l 2010-11-29 14:48:20.000000000 +0000
@@ -0,0 +1,61 @@
+.*/ifunc-2\.s: Assembler messages:
+.*/ifunc-2\.s:4: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:5: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:6: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:7: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:8: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:9: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:10: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:11: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:12: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:19: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:20: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:21: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:22: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:23: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:24: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:25: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:26: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:27: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:34: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:35: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:36: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:37: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:38: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:39: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:40: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:41: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:42: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:44: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:45: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:50: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:51: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:56: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:57: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:62: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:63: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:64: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:65: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:66: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:67: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:68: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:69: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:70: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:77: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:78: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:79: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:80: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:81: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:82: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:83: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:84: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:85: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:92: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:93: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:94: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:95: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:96: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:97: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:98: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:99: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:100: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
Index: gas/testsuite/gas/i386/ifunc-3.s
===================================================================
--- /dev/null 2010-11-23 09:11:06.403484413 +0000
+++ gas/testsuite/gas/i386/ifunc-3.s 2010-11-29 15:03:48.000000000 +0000
@@ -0,0 +1,54 @@
+ .section .text.1,"ax",@progbits
+
+start1:
+ .long bar1-.
+ .long bar2-.
+ .long bar1-start1
+ .long bar2-start1
+ .long bar1-base
+
+ .type bar1,%gnu_indirect_function
+bar1:
+ ret
+ .size bar1,.-bar1
+ .align 4
+
+ .long bar1-.
+ .long bar2-.
+ .long bar1-start1
+ .long bar2-start1
+ .long bar1-base
+
+ .long abs1-.
+ .long abs1-start1
+ .long abs1-base
+
+ .equ abs1,0x11223300
+ .type abs1,%gnu_indirect_function
+
+ .long abs1-.
+ .long abs1-start1
+ .long abs1-base
+
+ .section .text.2,"ax",@progbits
+
+start2:
+ .long bar1-.
+ .long bar2-.
+ .long bar1-start2
+ .long bar2-start2
+ .long bar2-base
+
+ .type bar2,%gnu_indirect_function
+bar2:
+ ret
+ .size bar2,.-bar2
+ .align 4
+
+ .long bar1-.
+ .long bar2-.
+ .long bar1-start2
+ .long bar2-start2
+ .long bar2-base
+
+ .equ base,0xabc0
Index: gas/testsuite/gas/i386/ifunc-3.d
===================================================================
--- /dev/null 2010-11-23 09:11:06.403484413 +0000
+++ gas/testsuite/gas/i386/ifunc-3.d 2010-11-29 15:27:21.000000000 +0000
@@ -0,0 +1,57 @@
+#readelf: --relocs --syms -x .text.1 -x .text.2
+#name: i386 ifunc 3
+
+Relocation section '\.rel\.text\.1' at offset .* contains .* entries:
+ Offset Info Type Sym.Value Sym. Name
+00000000 ........ R_386_PC32 bar1\(\) bar1
+00000004 ........ R_386_PC32 bar2\(\) bar2
+00000008 ........ R_386_PC32 bar1\(\) bar1
+0000000c ........ R_386_PC32 bar2\(\) bar2
+00000010 ........ R_386_32 bar1\(\) bar1
+00000018 ........ R_386_PC32 bar1\(\) bar1
+0000001c ........ R_386_PC32 bar2\(\) bar2
+00000020 ........ R_386_PC32 bar1\(\) bar1
+00000024 ........ R_386_PC32 bar2\(\) bar2
+00000028 ........ R_386_32 bar1\(\) bar1
+0000002c ........ R_386_PC32 abs1\(\) abs1
+00000030 ........ R_386_PC32 abs1\(\) abs1
+00000034 ........ R_386_32 abs1\(\) abs1
+00000038 ........ R_386_PC32 abs1\(\) abs1
+0000003c ........ R_386_PC32 abs1\(\) abs1
+00000040 ........ R_386_32 abs1\(\) abs1
+
+Relocation section '\.rel\.text\.2' at offset .* contains .* entries:
+ Offset Info Type Sym.Value Sym. Name
+00000000 ........ R_386_PC32 bar1\(\) bar1
+00000004 ........ R_386_PC32 bar2\(\) bar2
+00000008 ........ R_386_PC32 bar1\(\) bar1
+0000000c ........ R_386_PC32 bar2\(\) bar2
+00000010 ........ R_386_32 bar2\(\) bar2
+00000018 ........ R_386_PC32 bar1\(\) bar1
+0000001c ........ R_386_PC32 bar2\(\) bar2
+00000020 ........ R_386_PC32 bar1\(\) bar1
+00000024 ........ R_386_PC32 bar2\(\) bar2
+00000028 ........ R_386_32 bar2\(\) bar2
+
+Symbol table '.symtab' contains .* entries:
+ Num: Value Size Type Bind Vis Ndx Name
+#...
+.*: 00000014 1 IFUNC LOCAL DEFAULT .* bar1
+.*: 00000014 1 IFUNC LOCAL DEFAULT .* bar2
+#...
+.*: 11223300 0 IFUNC LOCAL DEFAULT ABS abs1
+#...
+
+Hex dump of section '\.text\.1':
+ NOTE: This section has relocations against it, but these have NOT been applied to this dump\.
+ 0x00000000 00000000 00000000 08000000 0c000000 .*
+ 0x00000010 4054ffff c38d7600 00000000 00000000 .*
+ 0x00000020 20000000 24000000 4054ffff 00000000 .*
+ 0x00000030 30000000 4054ffff 00000000 3c000000 .*
+ 0x00000040 4054ffff .*
+
+Hex dump of section '\.text\.2':
+ NOTE: This section has relocations against it, but these have NOT been applied to this dump\.
+ 0x00000000 00000000 00000000 08000000 0c000000 .*
+ 0x00000010 4054ffff c38d7600 00000000 00000000 .*
+ 0x00000020 20000000 24000000 4054ffff .*
Index: gas/testsuite/gas/i386/i386.exp
===================================================================
--- gas/testsuite/gas/i386/i386.exp 2010-11-05 17:12:13.000000000 +0000
+++ gas/testsuite/gas/i386/i386.exp 2010-11-29 14:44:35.000000000 +0000
@@ -215,6 +215,8 @@ if [expr ([istarget "i*86-*-*"] || [ist
run_list_test "inval-equ-1" "-al"
run_list_test "inval-equ-2" "-al"
run_dump_test "ifunc"
+ run_list_test "ifunc-2"
+ run_dump_test "ifunc-3"
run_list_test "l1om-inval" "-march=l1om --32"
run_dump_test "localpic"
run_dump_test "debug1"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Stopping GAS from resolving IFUNC symbols itself
2010-11-30 14:28 Stopping GAS from resolving IFUNC symbols itself Richard Sandiford
@ 2010-12-01 4:09 ` Alan Modra
2010-12-01 17:51 ` Richard Sandiford
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2010-12-01 4:09 UTC (permalink / raw)
To: binutils, richard.sandiford
On Tue, Nov 30, 2010 at 10:51:21AM +0000, Richard Sandiford wrote:
> Patch tested on x86_64-linux-gnu. Since the patch touches only
> target-independent code, I intend to commit it in a couple of days
> unless there are objections.
Please don't commit without further testing. AOUT, COFF, PE etc.
I'll be surprised if this patch doesn't break something..
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Stopping GAS from resolving IFUNC symbols itself
2010-12-01 4:09 ` Alan Modra
@ 2010-12-01 17:51 ` Richard Sandiford
2010-12-02 13:26 ` Richard Sandiford
0 siblings, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2010-12-01 17:51 UTC (permalink / raw)
To: binutils
Alan Modra <amodra@gmail.com> writes:
> On Tue, Nov 30, 2010 at 10:51:21AM +0000, Richard Sandiford wrote:
>> Patch tested on x86_64-linux-gnu. Since the patch touches only
>> target-independent code, I intend to commit it in a couple of days
>> unless there are objections.
>
> Please don't commit without further testing. AOUT, COFF, PE etc.
OK.
> I'll be surprised if this patch doesn't break something..
Well, I'd be disappointed if it did TBH. On those targets,
the extra S_FORCE_RELOC checks just reject undefined and common
symbols. Such symbols should be rejected already (via SEG_NORMAL, etc.).
I'm going through your list of test targets just to be sure.
I've got up to ia64-elf so far, and everything seems happy.
I'll test the rest overnight.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Stopping GAS from resolving IFUNC symbols itself
2010-12-01 17:51 ` Richard Sandiford
@ 2010-12-02 13:26 ` Richard Sandiford
0 siblings, 0 replies; 4+ messages in thread
From: Richard Sandiford @ 2010-12-02 13:26 UTC (permalink / raw)
To: binutils
Richard Sandiford <richard.sandiford@linaro.org> writes:
> I'm going through your list of test targets just to be sure.
> I've got up to ia64-elf so far, and everything seems happy.
> I'll test the rest overnight.
No failures on Alan's Big List Of Targets, so I went ahead and
applied it. Please shout if something goes wrong though.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-02 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-30 14:28 Stopping GAS from resolving IFUNC symbols itself Richard Sandiford
2010-12-01 4:09 ` Alan Modra
2010-12-01 17:51 ` Richard Sandiford
2010-12-02 13:26 ` Richard Sandiford
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).