diff options
author | Nick Clifton <nickc@redhat.com> | 1998-08-20 21:47:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1998-08-20 21:47:17 +0000 |
commit | e93a31e414b0239211f3e6ded0b7a08b1d6f16ea (patch) | |
tree | 92ed4ad5ee9b33afbb6c117d36f6aa4beba6a0f1 | |
parent | af98e836ec8f45921159441336102c21835e3640 (diff) | |
download | gdb-e93a31e414b0239211f3e6ded0b7a08b1d6f16ea.zip gdb-e93a31e414b0239211f3e6ded0b7a08b1d6f16ea.tar.gz gdb-e93a31e414b0239211f3e6ded0b7a08b1d6f16ea.tar.bz2 |
do not adjust relocations against thumb function names as the linker needs
this information.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 26 |
2 files changed, 30 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0d3f2e5..2451724 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +start-sanitize-armelf +Thu Aug 20 14:45:08 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations + against Thumb function names, as the linker needs this information. +end-sanitize-armelf 1998-08-20 Vladimir N. Makarov <vmakarov@cygnus.com> * expr.c (operand): Check also that there is no advance in operand diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 8739c26..f1bc1fc 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -6407,12 +6407,34 @@ arm_canonicalize_symbol_name (name) return name; } /* start-sanitize-armelf */ +#ifdef OBJ_ELF +/* Relocations against Thumb function names must be left unadjusted, + so that the linker can use this information to correctly set the + bottom bit of their addresses. The MIPS version of this function + also prevents relocations that are mips-16 specific, but I do not + know why it does this. + + FIXME: + There is one other problem that ought to be addressed here, but + which currently is not: Taking the address of a label (rather + than a function) and then later jumping to that address. Such + address also ought to have their bottom bit set (assuming that + they reside in Thumb code), but at the moment they will not. */ + boolean -arm_fix_adjustable(fixP) - fixS *fixP; +arm_fix_adjustable (fixP) + fixS *fixP; { + if (fixP->fx_addsy == NULL) + return 1; + + if (THUMB_IS_FUNC (fixP->fx_addsy) + && fixP->fx_subsy == NULL) + return 0; + return 1; } +#endif /* OBJ_ELF */ /* end-sanitize-armelf */ boolean |