]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
authorIan Lance Taylor <ian@airs.com>
Tue, 28 Dec 1993 17:45:14 +0000 (17:45 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 28 Dec 1993 17:45:14 +0000 (17:45 +0000)
then skip bfd_perform_relocation even if the addend is non-zero.

bfd/ChangeLog
bfd/elf.c

index a753af601d21caa06612816768a43c4b7df45114..d15df8b9ca44b0cf8851934a965248215acb44f0 100644 (file)
@@ -1,3 +1,8 @@
+Tue Dec 28 12:43:54 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
+       then skip bfd_perform_relocation even if the addend is non-zero.
+
 Tue Dec 21 09:22:19 1993  Ken Raeburn  (raeburn@rtl.cygnus.com)
 
        * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
index 224eaacc4709491512e7ade180c53debf3294b6a..02b3b33bc799167e127f9008c7615797f976aa55 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -17,20 +17,26 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+/*
+
+SECTION
+       ELF backends
+
+       BFD support for ELF formats is being worked on.
+       Currently, the best supported back ends are for sparc and i386
+       (running svr4 or Solaris 2).
+
+       Documentation of the internals of the support code still needs
+       to be written.  The code is changing quickly enough that we
+       haven't bothered yet.
+ */
+
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
 #define ARCH_SIZE 0
 #include "libelf.h"
 
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
 /* Standard ELF hash function.  Do not change this function; you will
    cause invalid hash tables to be generated.  (Well, you would if this
    were being used yet.)  */
@@ -188,18 +194,6 @@ DEFUN (bfd_elf_find_section, (abfd, name),
   return 0;
 }
 
-const struct bfd_elf_arch_map bfd_elf_arch_map[] = {
-  { bfd_arch_sparc, EM_SPARC },
-  { bfd_arch_i386, EM_386 },
-  { bfd_arch_m68k, EM_68K },
-  { bfd_arch_m88k, EM_88K },
-  { bfd_arch_i860, EM_860 },
-  { bfd_arch_mips, EM_MIPS },
-  { bfd_arch_hppa, EM_HPPA },
-};
-
-const int bfd_elf_arch_map_size = sizeof (bfd_elf_arch_map) / sizeof (bfd_elf_arch_map[0]);
-
 const char *const bfd_elf_section_type_names[] = {
   "SHT_NULL", "SHT_PROGBITS", "SHT_SYMTAB", "SHT_STRTAB",
   "SHT_RELA", "SHT_HASH", "SHT_DYNAMIC", "SHT_NOTE",
@@ -232,7 +226,8 @@ bfd_elf_generic_reloc (abfd,
 {
   if (output_bfd != (bfd *) NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
-      && reloc_entry->addend == 0)
+      && (! reloc_entry->howto->partial_inplace
+         || reloc_entry->addend == 0))
     {
       reloc_entry->address += input_section->output_offset;
       return bfd_reloc_ok;