This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

S/390 patch for binutils-2.10





Good afternoon,
contained in this note you will find the binutils patch for linux on the
S/390.
I checked out from the current cvs repository on August 29 and created
the patch based on that version. I am sorry for the delay but the FSF
paperwork took some time to complete. It is one its way.
The patch comes in three parts:
1) binutils-s390-core.diff MD5 checksum 6303cfba6712b208e3c31cc5d48186e0
   Contains the bfd backend for elf_s390, the opcode definitions and the
   assembler.
2) binutils-s390-makefiles.diff MD5 checksum
186c64de6744c66e44343f4676e06577
   Contains all the changes in the Makefiles.
3) binutils-s390-config.diff MD5 checksum 8388102907cb47135898bed8bc921a3e
   Contains all the changes in the configuration files (config.guess,
config.sub
   and so on).

After I created the diffs and sent the patches on their way to get the
laywers
blessing I unfortunatly found another bug. I though it a good idea to
separate
the relocations for the PLT entries from the rest of the relocations. Can't
do
that because the dynamic linker doesn't like it. Here is the patch for this
problem that has to be applied on top of the core patch:

diff -u -r --new-file src/bfd/elf32-s390.c src-s390/bfd/elf32-s390.c
--- src/bfd/elf32-s390.c      Thu Aug 31 19:47:39 2000
+++ src-s390/bfd/elf32-s390.c Thu Aug 31 19:47:51 2000
@@ -1949,25 +1949,6 @@
          dyn.d_un.d_val = s->_raw_size;
           bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
           break;
-
-        case DT_RELASZ:
-          /* The procedure linkage table relocs (DT_JMPREL) should
-          not be included in the overall relocs (DT_RELA).
-          Therefore, we override the DT_RELASZ entry here to
-          make it not include the JMPREL relocs.  Since the
-          linker script arranges for .rela.plt to follow all
-          other relocation sections, we don't have to worry
-          about changing the DT_RELA entry.  */
-          s = bfd_get_section_by_name (output_bfd, ".rela.plt");
-          if (s != NULL)
-         {
-           if (s->_cooked_size != 0)
-             dyn.d_un.d_val -= s->_cooked_size;
-           else
-             dyn.d_un.d_val -= s->_raw_size;
-         }
-          bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
-          break;
         }
     }

Last but not least the ChangeLog entries. I separated them from the
patch because they will look different anyway.

bfd/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * archures.c: Add bfd_s390_arch.
        * bfd-in2.h: Add bfd_s390_arch and s390/elf relocations.
        * cpu-s390.c: New file.
        * elf.c: Add bfd_arch_s390.
        * elf32-s390.c: New file.
        * libbfd.h: Add names for s390/elf relocations.
        * targets.c: Add bfd_elf32_s390_vec.

config/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * mh-s390pic: New file.
        * mt-s390pic: New file.

gas/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * config/tc-s390.c: New file.
        * config/tc-s390.h: New file.

include/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * dis-asm.h: Add print_insn_s390.

include/elf/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * common.h: Add EM_S390.
        * s390.h: New file.

include/opcode/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * s390.h: New file.

ld/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * emulparams/elf_s390.sh: New file.

opcodes/ChangeLog:
2000-08-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>

        * disassemble.c: Add bfd_arch_s390.
        * s390-dis.c: New file.
        * s390-mkopc.c: New file.
        * s390-opc.c: New file.
        * s390-opc.txt: New file.

In case of questions, suggestions, things that need to be changed
please contact me.

regards,
   Martin Schwidefsky

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com

(See attached file: binutils-s390-config.diff)(See attached file:
binutils-s390-core.diff)(See attached file: binutils-s390-makefiles.diff)

binutils-s390-config.diff

binutils-s390-core.diff

binutils-s390-makefiles.diff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]