* PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
@ 2004-11-16 2:48 Mark Mitchell
2004-11-16 3:32 ` Daniel Jacobowitz
2004-11-16 9:58 ` Richard Earnshaw
0 siblings, 2 replies; 5+ messages in thread
From: Mark Mitchell @ 2004-11-16 2:48 UTC (permalink / raw)
To: binutils
We got spurious warnings about uses of the R_ARM_TARGET2 relocation
because we forgot to translate it into the real underlying relocation
in elf32_arm_relocate_section.
OK?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2004-11-15 Mark Mitchell <mark@codesourcery.com>
* elf32-arm.c (elf32_arm_relocate_section): Use
arm_real_reloc_type.
Index: elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.7
diff -c -5 -p -r1.7 elf32-arm.c
*** elf32-arm.c 13 Nov 2004 13:38:15 -0000 1.7
--- elf32-arm.c 16 Nov 2004 02:46:27 -0000
*************** elf32_arm_relocate_section (bfd *
*** 3062,3077 ****
--- 3062,3079 ----
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
const char *name;
+ struct elf32_arm_link_hash_table * globals;
#if !USE_REL
if (info->relocatable)
return TRUE;
#endif
+ globals = elf32_arm_hash_table (info);
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
*************** elf32_arm_relocate_section (bfd *
*** 3087,3102 ****
bfd_reloc_status_type r;
arelent bfd_reloc;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
if ( r_type == R_ARM_GNU_VTENTRY
|| r_type == R_ARM_GNU_VTINHERIT)
continue;
! elf32_arm_info_to_howto (input_bfd, & bfd_reloc, rel);
howto = bfd_reloc.howto;
#if USE_REL
if (info->relocatable)
{
--- 3089,3107 ----
bfd_reloc_status_type r;
arelent bfd_reloc;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
+ #ifndef OLD_ARM_ABI
+ r_type = arm_real_reloc_type (globals, r_type);
+ #endif
if ( r_type == R_ARM_GNU_VTENTRY
|| r_type == R_ARM_GNU_VTINHERIT)
continue;
! bfd_reloc.howto = elf32_arm_howto_from_type (r_type);
howto = bfd_reloc.howto;
#if USE_REL
if (info->relocatable)
{
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
2004-11-16 2:48 PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section Mark Mitchell
@ 2004-11-16 3:32 ` Daniel Jacobowitz
2004-11-16 4:51 ` Mark Mitchell
2004-11-16 9:58 ` Richard Earnshaw
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-11-16 3:32 UTC (permalink / raw)
To: Mark Mitchell; +Cc: binutils
On Mon, Nov 15, 2004 at 06:48:14PM -0800, Mark Mitchell wrote:
> + #ifndef OLD_ARM_ABI
> + r_type = arm_real_reloc_type (globals, r_type);
> + #endif
I'm delighted to say you don't need the #ifndef any more.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
2004-11-16 3:32 ` Daniel Jacobowitz
@ 2004-11-16 4:51 ` Mark Mitchell
0 siblings, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2004-11-16 4:51 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: binutils
Daniel Jacobowitz wrote:
>On Mon, Nov 15, 2004 at 06:48:14PM -0800, Mark Mitchell wrote:
>
>
>>+ #ifndef OLD_ARM_ABI
>>+ r_type = arm_real_reloc_type (globals, r_type);
>>+ #endif
>>
>>
>
>I'm delighted to say you don't need the #ifndef any more.
>
>
Really? There are still a bunch of them in elf32-arm.c. Maybe they're
scheduled for deletion?
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
2004-11-16 2:48 PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section Mark Mitchell
2004-11-16 3:32 ` Daniel Jacobowitz
@ 2004-11-16 9:58 ` Richard Earnshaw
2004-11-16 10:09 ` Mark Mitchell
1 sibling, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2004-11-16 9:58 UTC (permalink / raw)
To: Mark Mitchell; +Cc: binutils
On Tue, 2004-11-16 at 02:48, Mark Mitchell wrote:
> We got spurious warnings about uses of the R_ARM_TARGET2 relocation
> because we forgot to translate it into the real underlying relocation
> in elf32_arm_relocate_section.
>
> OK?
>
> --
> Mark Mitchell
> CodeSourcery, LLC
> mark@codesourcery.com
>
> 2004-11-15 Mark Mitchell <mark@codesourcery.com>
>
> * elf32-arm.c (elf32_arm_relocate_section): Use
> arm_real_reloc_type.
This is OK.
And Daniel is right, this is elf32-arm.c, and it only supports the 'new'
(!OLD_ARM_ABI) ABI.
I haven't seen a patch yet to delete the ifdefs (or if there's been one,
I missed it).
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section
2004-11-16 9:58 ` Richard Earnshaw
@ 2004-11-16 10:09 ` Mark Mitchell
0 siblings, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2004-11-16 10:09 UTC (permalink / raw)
To: Richard Earnshaw; +Cc: binutils
Richard Earnshaw wrote:
>>2004-11-15 Mark Mitchell <mark@codesourcery.com>
>>
>> * elf32-arm.c (elf32_arm_relocate_section): Use
>> arm_real_reloc_type.
>>
>>
>
>
>This is OK.
>
>And Daniel is right, this is elf32-arm.c, and it only supports the 'new'
>(!OLD_ARM_ABI) ABI.
>
>
Amended so as to have no #ifndef, and checked in.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-16 10:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-16 2:48 PATCH: Correct handling of R_ARM_TARGET2 in elf32_arm_relocate_section Mark Mitchell
2004-11-16 3:32 ` Daniel Jacobowitz
2004-11-16 4:51 ` Mark Mitchell
2004-11-16 9:58 ` Richard Earnshaw
2004-11-16 10:09 ` Mark Mitchell
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).