* elf.c (prep_headers): Use new EM_SPARCV9 symbol.
authorRichard Henderson <rth@redhat.com>
Wed, 15 Apr 1998 23:09:52 +0000 (23:09 +0000)
committerRichard Henderson <rth@redhat.com>
Wed, 15 Apr 1998 23:09:52 +0000 (23:09 +0000)
        * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
        (ELF_MACHINE_ALT1): New.  Set to EM_OLD_SPARC64.

bfd/ChangeLog
bfd/elf.c

index 994bcfd00017dfae82b74b33a920be0f794ebdb7..7744e46d2e711b35a9329b6071f45c208326dca5 100644 (file)
@@ -1,3 +1,9 @@
+Wed Apr 15 16:08:46 1998  Richard Henderson  <rth@cygnus.com>
+
+       * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
+       * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
+       (ELF_MACHINE_ALT1): New.  Set to EM_OLD_SPARC64.
+
 Wed Apr 15 11:34:33 1998  Ian Lance Taylor  <ian@cygnus.com>
 
        * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
index 5ea51070eb94838071b42841ab1617ccff971917..954207e757f471eaa87d919f63cbe9bcd6e6c182 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2855,7 +2855,7 @@ prep_headers (abfd)
       break;
     case bfd_arch_sparc:
       if (bed->s->arch_size == 64)
-       i_ehdrp->e_machine = EM_SPARC64;
+       i_ehdrp->e_machine = EM_SPARCV9;
       else
        i_ehdrp->e_machine = EM_SPARC;
       break;
@@ -3274,10 +3274,12 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
     {
       asection *s;
 
-      /* Only set up the segments when all the sections have been set
-         up.  */
-      for (s = ibfd->sections; s != NULL; s = s->next)
-       if (s->output_section == NULL)
+      /* Only set up the segments if there are no more SEC_ALLOC
+         sections.  FIXME: This won't do the right thing if objcopy is
+         used to remove the last SEC_ALLOC section, since objcopy
+         won't call this routine in that case.  */
+      for (s = isec->next; s != NULL; s = s->next)
+       if ((s->flags & SEC_ALLOC) != 0)
          break;
       if (s == NULL)
        {
This page took 0.031713 seconds and 4 git commands to generate.