* elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
	around uses of R_ARM_TARGET1.
	(elf32_arm_check_relocs): Likewise.
ld/
	* emultempl/armelf_oabi.em (before_allocation): Add extra zero param
	to bfd_elf32_arm_process_before_allocation call.
This commit is contained in:
Alan Modra
2004-09-16 12:49:56 +00:00
parent f7dc124454
commit b6ee372a3e
4 changed files with 29 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2004-09-16 Alan Modra <amodra@bigpond.net.au>
* elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
around uses of R_ARM_TARGET1.
(elf32_arm_check_relocs): Likewise.
2004-09-13 Paul Brook <paul@codesourcery.com> 2004-09-13 Paul Brook <paul@codesourcery.com>
* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update

View File

@ -2759,7 +2759,9 @@ elf32_arm_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
case R_ARM_ABS32: case R_ARM_ABS32:
case R_ARM_REL32: case R_ARM_REL32:
#ifndef OLD_ARM_ABI
case R_ARM_TARGET1: case R_ARM_TARGET1:
#endif
case R_ARM_PC24: case R_ARM_PC24:
case R_ARM_PLT32: case R_ARM_PLT32:
r_symndx = ELF32_R_SYM (rel->r_info); r_symndx = ELF32_R_SYM (rel->r_info);
@ -2775,8 +2777,10 @@ elf32_arm_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
h->plt.refcount -= 1; h->plt.refcount -= 1;
if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32 if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32 #ifndef OLD_ARM_ABI
|| ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1) || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1
#endif
|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
{ {
eh = (struct elf32_arm_link_hash_entry *) h; eh = (struct elf32_arm_link_hash_entry *) h;
@ -2887,7 +2891,9 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_ARM_ABS32: case R_ARM_ABS32:
case R_ARM_REL32: case R_ARM_REL32:
#ifndef OLD_ARM_ABI
case R_ARM_TARGET1: case R_ARM_TARGET1:
#endif
case R_ARM_PC24: case R_ARM_PC24:
case R_ARM_PLT32: case R_ARM_PLT32:
if (h != NULL) if (h != NULL)
@ -2930,8 +2936,10 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
&& (sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_ALLOC) != 0
&& ((ELF32_R_TYPE (rel->r_info) != R_ARM_PC24 && ((ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
&& ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32 && ELF32_R_TYPE (rel->r_info) != R_ARM_PLT32
&& ELF32_R_TYPE (rel->r_info) != R_ARM_REL32 #ifndef OLD_ARM_ABI
&& ELF32_R_TYPE (rel->r_info) != R_ARM_TARGET1) && ELF32_R_TYPE (rel->r_info) != R_ARM_TARGET1
#endif
&& ELF32_R_TYPE (rel->r_info) != R_ARM_REL32)
|| (h != NULL || (h != NULL
&& (! info->symbolic && (! info->symbolic
|| (h->elf_link_hash_flags || (h->elf_link_hash_flags
@ -3016,8 +3024,10 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
} }
if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32 if (ELF32_R_TYPE (rel->r_info) == R_ARM_ABS32
|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32 #ifndef OLD_ARM_ABI
|| ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1) || ELF32_R_TYPE (rel->r_info) == R_ARM_TARGET1
#endif
|| ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
p->count += 1; p->count += 1;
} }
break; break;

View File

@ -1,3 +1,8 @@
2004-09-16 Alan Modra <amodra@bigpond.net.au>
* emultempl/armelf_oabi.em (before_allocation): Add extra zero param
to bfd_elf32_arm_process_before_allocation call.
2004-09-13 Paul Brook <paul@codesourcery.com> 2004-09-13 Paul Brook <paul@codesourcery.com>
* emulparams/armsymbian.sh: Set TARGET1_IS_REL. * emulparams/armsymbian.sh: Set TARGET1_IS_REL.

View File

@ -68,7 +68,8 @@ gld${EMULATION_NAME}_before_allocation (void)
{ {
LANG_FOR_EACH_INPUT_STATEMENT (is) LANG_FOR_EACH_INPUT_STATEMENT (is)
{ {
if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0, 0)) if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info,
0, 0, 0))
{ {
/* xgettext:c-format */ /* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename); einfo (_("Errors encountered processing file %s"), is->filename);