2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Thu, 21 Jan 2010 11:40:28 +0000 (11:40 +0000)
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Thu, 21 Jan 2010 11:40:28 +0000 (11:40 +0000)
* readelf.c (get_machine_flags): Handle EF_S390_HIGH_GPRS.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* s390.h (EF_S390_HIGH_GPRS): Added macro definition.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* config/tc-s390.c (s390_elf_final_processing): New function.
* config/tc-s390.h (elf_tc_final_processing): New macro definition.
(s390_elf_final_processing): Added prototype.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
(bfd_elf32_bfd_merge_private_bfd_data): New macro definition.

bfd/ChangeLog
bfd/elf32-s390.c
binutils/ChangeLog
binutils/readelf.c
gas/ChangeLog
gas/config/tc-s390.c
gas/config/tc-s390.h
include/ChangeLog
include/elf/s390.h

index 75574a7fc59c9acaa38cd5c8b4a4950da2ffa915..470610ee8dabb286db00a1d99031dfc01023aba3 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+       
+       * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
+       (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
+
 2010-01-19  Cary Coutant  <ccoutant@google.com>
 
        * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
index 094a8dc38dc30b5287d5db137724f20ce172d20d..41178d68331afe76b33ccf050ccf799ea15d3bb6 100644 (file)
@@ -3483,6 +3483,13 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
   return plt->vma + PLT_FIRST_ENTRY_SIZE + i * PLT_ENTRY_SIZE;
 }
 
+static bfd_boolean
+elf32_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+  elf_elfheader (obfd)->e_flags |= elf_elfheader (ibfd)->e_flags;
+  return TRUE;
+}
+
 
 #define TARGET_BIG_SYM bfd_elf32_s390_vec
 #define TARGET_BIG_NAME        "elf32-s390"
@@ -3506,6 +3513,8 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
 #define bfd_elf32_bfd_reloc_type_lookup              elf_s390_reloc_type_lookup
 #define bfd_elf32_bfd_reloc_name_lookup elf_s390_reloc_name_lookup
 
+#define bfd_elf32_bfd_merge_private_bfd_data  elf32_s390_merge_private_bfd_data
+
 #define elf_backend_adjust_dynamic_symbol     elf_s390_adjust_dynamic_symbol
 #define elf_backend_check_relocs             elf_s390_check_relocs
 #define elf_backend_copy_indirect_symbol      elf_s390_copy_indirect_symbol
index c980f858cb74cebe4e7b426a886ea95a4ddd0697..52645fef3798779ae79f135837ddc8f348d22db9 100644 (file)
@@ -1,3 +1,7 @@
+2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+       
+       * readelf.c (get_machine_flags): Handle EF_S390_HIGH_GPRS.
+
 2010-01-19  Ian Lance Taylor  <iant@google.com>
 
        * objcopy.c (copy_main): Rewrite OPTION_ADD_SECTION code to work
index 8c9edce232ef333ce6f629887d4453ff7d44e487..b9de73a116a73198f543e6cdd8061d14a2f01a96 100644 (file)
@@ -2508,6 +2508,10 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
            strcat (buf, ", 64-bit doubles");
          if (e_flags & E_FLAG_RX_DSP)
            strcat (buf, ", dsp");        
+
+       case EM_S390:
+         if (e_flags & EF_S390_HIGH_GPRS)
+           strcat (buf, ", highgprs");
        }
     }
 
index a1195e8087aec45262417a1840b04f22628ef717..ea20cf61163f31c17f03a71054a4034658dce983 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+       
+       * config/tc-s390.c (s390_elf_final_processing): New function.
+       * config/tc-s390.h (elf_tc_final_processing): New macro definition.
+       (s390_elf_final_processing): Added prototype.
+
+
 2010-01-20  Nick Clifton  <nickc@redhat.com>
 
        PR 11109
index b0c453a5c2498085829a680e8d00a0a5a706b2d9..70a1adcdb48e747d23b305391acdab57e181b675 100644 (file)
@@ -2265,3 +2265,10 @@ tc_s390_regname_to_dw2regnum (char *regname)
     regnum = 33;
   return regnum;
 }
+
+void
+s390_elf_final_processing (void)
+{
+  if (s390_arch_size == 32 && (current_mode_mask & (1 << S390_OPCODE_ZARCH)))
+    elf_elfheader (stdoutput)->e_flags |= EF_S390_HIGH_GPRS;
+}
index f8fe581b2e3253ff1e575e10109b451c075b0ec9..f896e44775f4c8327701b802a6cab68fce7760e3 100644 (file)
@@ -95,3 +95,7 @@ extern int s390_cie_data_alignment;
 #define DWARF2_LINE_MIN_INSN_LENGTH     1
 #define DWARF2_DEFAULT_RETURN_COLUMN    14
 #define DWARF2_CIE_DATA_ALIGNMENT       s390_cie_data_alignment
+
+extern void s390_elf_final_processing (void);
+
+#define elf_tc_final_processing s390_elf_final_processing
index db4665407f41b16af2dc938c133de42681018547..18d8e1000c44e22ed2181b0166540e9ba31a2feb 100644 (file)
@@ -1,3 +1,7 @@
+2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+       
+       * s390.h (EF_S390_HIGH_GPRS): Added macro definition.
+
 2010-01-13  Joel Brobecker  <brobecker@adacore.com>
 
        Add new DW_AT_use_GNAT_descriptive_type CU attribute.
index c62b110166a6c6a88923764cac5f013abb3e4ab2..17c4abfe1f5b2453a1cfabf6a1e899a94b5a3c6d 100644 (file)
 
 #include "elf/reloc-macros.h"
 
+/* Processor specific flags for the ELF header e_flags field.  */
+
+#define EF_S390_HIGH_GPRS        0x00000001
+
 /* Relocation types.  */
 
 START_RELOC_NUMBERS (elf_s390_reloc_type)