* [ECOS] About [ECOS] ecosSWtools problems
@ 1999-08-11 7:19 Catherine Moore
0 siblings, 0 replies; only message in thread
From: Catherine Moore @ 1999-08-11 7:19 UTC (permalink / raw)
To: ecos-discuss; +Cc: clm, nickc, robin.farine
Here is a patch to fix a problem that Robin reported with
the --gc-sections linker option causing referenced code to be
discarded for the Arm tool chain.
1999-07-30 Catherine Moore <clm@cygnus.com>
* gas/config/tc-arm.c (tc_gen_reloc): Record the vtable entry in
the relocation's section offset.
* bfd/elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
R_ARM_GNU_VTENTRY.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/config/tc-arm.c,v
retrieving revision 1.66.2.3
diff -c -2 -p -r1.66.2.3 tc-arm.c
*** tc-arm.c 1999/07/16 20:31:06 1.66.2.3
--- tc-arm.c 1999/07/30 17:14:36
*************** tc_gen_reloc (section, fixp)
*** 5746,5749 ****
--- 5746,5754 ----
}
+ /* HACK: Since arm ELF uses Rel instead of Rela, encode the
+ vtable entry to be used in the relocation's section offset. */
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ reloc->address = fixp->fx_offset;
+
return reloc;
}
Index: bfd/elf32-arm.h
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/elf32-arm.h,v
retrieving revision 1.2.4.2
diff -c -2 -p -r1.2.4.2 elf32-arm.h
*** elf32-arm.h 1999/07/16 20:22:55 1.2.4.2
--- elf32-arm.h 1999/07/30 17:14:43
*************** elf32_arm_check_relocs (abfd, info, sec,
*** 1727,1731 ****
used. Record for later use during GC. */
case R_ARM_GNU_VTENTRY:
! if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return false;
break;
--- 1727,1731 ----
used. Record for later use during GC. */
case R_ARM_GNU_VTENTRY:
! if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset))
return false;
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-08-11 7:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-11 7:19 [ECOS] About [ECOS] ecosSWtools problems Catherine Moore
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).