public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Catherine Moore <clm@cygnus.com>
To: ecos-discuss@sourceware.cygnus.com
Cc: clm@cygnus.com, nickc@cygnus.com, robin.farine@terminus.org
Subject: [ECOS] About [ECOS] ecosSWtools problems
Date: Wed, 11 Aug 1999 07:19:00 -0000	[thread overview]
Message-ID: <199908111419.HAA29744@cygint.cygnus.com> (raw)

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;

                 reply	other threads:[~1999-08-11  7:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908111419.HAA29744@cygint.cygnus.com \
    --to=clm@cygnus.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=nickc@cygnus.com \
    --cc=robin.farine@terminus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).