This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Never emit R_ARM_PC24 relocations when linking
on Thu, Jan 08, 2004 at 07:12:41PM -0500, Daniel Jacobowitz wrote:
> On Thu, Jan 08, 2004 at 11:42:29PM +0000, Phil Blundell wrote:
> > linker input should be treated as entirely synonymous, right? The next
> > obvious stage would be to stop gas from producing PLT32, and then that
> > reloc type can fade gently into obscurity.
>
> Yes. The only difference I see in their handling now is a case I
> missed in relocate_section, and some PC24 code that doesn't handle
> PLT32 for interworking.
Great. Well, here's a patch for the gas change I mentioned yesterday.
p.
2004-01-09 Philip Blundell <pb@nexus.co.uk>
* config/tc-arm.c (do_branch): Eat "(plt)" qualifier but don't
output any special relocation.
(do_branch25): Likewise.
Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.159
diff -u -p -r1.159 tc-arm.c
--- config/tc-arm.c 29 Dec 2003 16:43:37 -0000 1.159
+++ config/tc-arm.c 9 Jan 2004 17:11:25 -0000
@@ -5882,17 +5882,13 @@ do_branch25 (str)
&& *str == '('
&& arm_parse_reloc () == BFD_RELOC_ARM_PLT32)
{
- inst.reloc.type = BFD_RELOC_ARM_PLT32;
- inst.reloc.pc_rel = 0;
/* Modify str to point to after parsed operands, otherwise
end_of_line() will complain about the (PLT) left in str. */
str = input_line_pointer;
}
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
- inst.reloc.pc_rel = 1;
- }
+
+ inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX;
+ inst.reloc.pc_rel = 1;
input_line_pointer = save_in;
}
@@ -8267,17 +8263,14 @@ do_branch (str)
&& *str == '('
&& arm_parse_reloc () == BFD_RELOC_ARM_PLT32)
{
- inst.reloc.type = BFD_RELOC_ARM_PLT32;
- inst.reloc.pc_rel = 0;
/* Modify str to point to after parsed operands, otherwise
end_of_line() will complain about the (PLT) left in str. */
str = input_line_pointer;
}
- else
- {
- inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
- inst.reloc.pc_rel = 1;
- }
+
+ inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH;
+ inst.reloc.pc_rel = 1;
+
input_line_pointer = save_in;
}
#else