Add support for a .secrel32 x86 reloc to allow DWARF" debug information to used
authorNick Clifton <nickc@redhat.com>
Tue, 20 Apr 2004 12:17:16 +0000 (12:17 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 20 Apr 2004 12:17:16 +0000 (12:17 +0000)
with COFF based x86 ports.

19 files changed:
bfd/ChangeLog
bfd/bfd-in2.h
bfd/coff-i386.c
bfd/libbfd.h
bfd/reloc.c
gas/ChangeLog
gas/config/tc-i386.c
gas/config/tc-i386.h
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/secrel.d [new file with mode: 0644]
gas/testsuite/gas/i386/secrel.s [new file with mode: 0644]
include/coff/ChangeLog
include/coff/internal.h
ld/testsuite/ChangeLog
ld/testsuite/ld-pe/pe.exp [new file with mode: 0644]
ld/testsuite/ld-pe/secrel.d [new file with mode: 0644]
ld/testsuite/ld-pe/secrel1.s [new file with mode: 0644]
ld/testsuite/ld-pe/secrel2.s [new file with mode: 0644]

index dda65cd5503dbf4df7d2b14eb4a04ce5550fa0b3..bff42748257ddef6b269b7942504f5d7f5378f9d 100644 (file)
@@ -1,3 +1,12 @@
+2004-04-20  DJ Delorie  <dj@redhat.com>
+
+       * reloc.c: Add BFD_RELOC_32_SECREL.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Likewise.
+       * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
+       (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
+       (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
+
 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
 
        * elf32-sparc.c (elf32_sparc_relocate_section): Handle
index c2e18194be80ad116b49e90df9f59888d6e3bfdc..07af231fbaacaa86e35ca81404ba2182803f6c15 100644 (file)
@@ -2027,6 +2027,9 @@ The 24-bit relocation is used in some Intel 960 configurations.  */
   BFD_RELOC_12_PCREL,
   BFD_RELOC_8_PCREL,
 
+/* Section relative relocations.  Some targets need this for DWARF2.  */
+  BFD_RELOC_32_SECREL,
+
 /* For ELF.  */
   BFD_RELOC_32_GOT_PCREL,
   BFD_RELOC_16_GOT_PCREL,
index a24344ad8c3b8530d53dfeaf8648dd5edc1399f1..e2bf8602355bc4f7fe8e90128ae00cf9ac7ce2ad 100644 (file)
@@ -234,7 +234,24 @@ static reloc_howto_type howto_table[] =
   EMPTY_HOWTO (010),
   EMPTY_HOWTO (011),
   EMPTY_HOWTO (012),
+#ifdef COFF_WITH_PE
+  /* 32-bit longword section relative relocation (013).  */
+  HOWTO (R_SECREL32,           /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        coff_i386_reloc,       /* special_function */
+        "secrel32",            /* name */
+        TRUE,                  /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        TRUE),                 /* pcrel_offset */
+#else
   EMPTY_HOWTO (013),
+#endif
   EMPTY_HOWTO (014),
   EMPTY_HOWTO (015),
   EMPTY_HOWTO (016),
@@ -497,6 +514,30 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
     {
       *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
     }
+
+  if (rel->r_type == R_SECREL32)
+    {
+      bfd_vma osect_vma;
+
+      if (h && (h->type == bfd_link_hash_defined
+               || h->type == bfd_link_hash_defweak))
+       osect_vma = h->root.u.def.section->output_section->vma;
+      else
+       {
+         asection *sec;
+         int i;
+
+         /* Sigh, the only way to get the section to offset against
+            is to find it the hard way.  */
+
+         for (sec = abfd->sections, i = 1; i < sym->n_scnum; i++)
+           sec = sec->next;
+
+         osect_vma = sec->output_section->vma;
+       }
+
+      *addendp -= osect_vma;
+    }
 #endif
 
   return howto;
@@ -525,6 +566,10 @@ coff_i386_reloc_type_lookup (abfd, code)
       return howto_table + R_RELBYTE;
     case BFD_RELOC_8_PCREL:
       return howto_table + R_PCRBYTE;
+#ifdef COFF_WITH_PE
+    case BFD_RELOC_32_SECREL:
+      return howto_table + R_SECREL32;
+#endif
     default:
       BFD_FAIL ();
       return 0;
index e4e17f98035ba48407653e9863a465b7e35d0b66..6afe58d4635133a92dbd904a198cc1e9473462c1 100644 (file)
@@ -699,6 +699,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_16_PCREL",
   "BFD_RELOC_12_PCREL",
   "BFD_RELOC_8_PCREL",
+  "BFD_RELOC_32_SECREL",
   "BFD_RELOC_32_GOT_PCREL",
   "BFD_RELOC_16_GOT_PCREL",
   "BFD_RELOC_8_GOT_PCREL",
index cc4f6a7c28f945a2f387248e080213464a2b6eb4..59fe848e978acb2c80d339bdb31899874af83b18 100644 (file)
@@ -1646,6 +1646,11 @@ the section containing the relocation.  It depends on the specific target.
 
 The 24-bit relocation is used in some Intel 960 configurations.
 
+ENUM
+  BFD_RELOC_32_SECREL
+ENUMDOC
+  Section relative relocations.  Some targets need this for DWARF2.
+
 ENUM
   BFD_RELOC_32_GOT_PCREL
 ENUMX
index f98a14d034d5f3389d387997863ddf60ec80cf63..9f0167cc37e11cbee6556bdbc80ea2d03544fb26 100644 (file)
@@ -1,3 +1,12 @@
+2004-04-20  DJ Delorie  <dj@redhat.com>
+
+       * config/tc-i386.h [TE_PE] (TC_CONS_FIX_NEW): Define.
+       * config/tc-i386.c (md_pseudo_table) [TE_PE]: Add "secrel32".
+       [TE_PE] (O_secrel): Define.
+       [TE_PE] (x86_pe_cons_fix_new): New.
+       [TE_PE] (pe_directive_secrel): Likewise.
+       (tc_gen_reloc) [TE_PE]: Support BFD_RELOC_32_SECREL.
+
 2004-04-19  Eric Christopher  <echristo@redhat.com>
 
         * config/tc-mips.c (mips_dwarf2_addr_size): Revert part
index 5de6a55d2f513c66e11e22e1f89fc02a1c88efef..f37c259249fc029c20aa64a8039a56087a908349 100644 (file)
@@ -76,6 +76,9 @@ static void set_code_flag PARAMS ((int));
 static void set_16bit_gcc_code_flag PARAMS ((int));
 static void set_intel_syntax PARAMS ((int));
 static void set_cpu_arch PARAMS ((int));
+#ifdef TE_PE
+static void pe_directive_secrel PARAMS ((int));
+#endif
 static char *output_invalid PARAMS ((int c));
 static int i386_operand PARAMS ((char *operand_string));
 static int i386_intel_operand PARAMS ((char *operand_string, int got_a_float));
@@ -444,6 +447,9 @@ const pseudo_typeS md_pseudo_table[] =
   {"att_syntax", set_intel_syntax, 0},
   {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
   {"loc", dwarf2_directive_loc, 0},
+#ifdef TE_PE
+  {"secrel32", pe_directive_secrel, 0},
+#endif
   {0, 0, 0}
 };
 
@@ -3638,6 +3644,50 @@ x86_cons (exp, size)
 }
 #endif
 
+#ifdef TE_PE
+
+#define O_secrel (O_max + 1)
+
+void
+x86_pe_cons_fix_new (frag, off, len, exp)
+     fragS *frag;
+     unsigned int off;
+     unsigned int len;
+     expressionS *exp;
+{
+  enum bfd_reloc_code_real r = reloc (len, 0, 0, NO_RELOC);
+
+  if (exp->X_op == O_secrel)
+    {
+      exp->X_op = O_symbol;
+      r = BFD_RELOC_32_SECREL;
+    }
+
+  fix_new_exp (frag, off, len, exp, 0, r);
+}
+
+static void
+pe_directive_secrel (dummy)
+     int dummy ATTRIBUTE_UNUSED;
+{
+  expressionS exp;
+
+  do
+    {
+      expression (&exp);
+      if (exp.X_op == O_symbol)
+       exp.X_op = O_secrel;
+
+      emit_expr (&exp, 4);
+    }
+  while (*input_line_pointer++ == ',');
+
+  input_line_pointer--;
+  demand_empty_rest_of_line ();
+}
+
+#endif
+
 static int i386_immediate PARAMS ((char *));
 
 static int
@@ -5165,6 +5215,9 @@ tc_gen_reloc (section, fixp)
     case BFD_RELOC_RVA:
     case BFD_RELOC_VTABLE_ENTRY:
     case BFD_RELOC_VTABLE_INHERIT:
+#ifdef TE_PE
+    case BFD_RELOC_32_SECREL:
+#endif
       code = fixp->fx_r_type;
       break;
     default:
index 14b522b56495374dc5db3aff6400ffab0c143691..5c48f58d4a55ee0a812bfd8830ff10f33c4d1e08 100644 (file)
@@ -408,6 +408,12 @@ extern void x86_cons_fix_new
   PARAMS ((fragS *, unsigned int, unsigned int, expressionS *));
 #endif
 
+#ifdef TE_PE
+#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_pe_cons_fix_new(FRAG, OFF, LEN, EXP)
+extern void x86_pe_cons_fix_new
+  PARAMS ((fragS *, unsigned int, unsigned int, expressionS *));
+#endif
+
 #define DIFF_EXPR_OK    /* foo-. gets turned into PC relative relocs */
 
 #define NO_RELOC BFD_RELOC_NONE
index c99e91f5d9474ac30831d3f9a22abe64ed1c74b9..6d6dfdfeb488c094e843409520ff2ccf9d0f7a7d 100644 (file)
@@ -1,3 +1,10 @@
+2004-04-20  Brian Ford  <ford@vss.fsi.com>
+           DJ Delorie  <dj@redhat.com>
+
+       * gas/i386/secrel.s: New test for .secrel32.
+       * gas/i386/secrel.d: Likewise.
+       * gas/i386/i386.exp: Call it for PE targets.
+
 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
 
        * gas/cfi/cfi-sparc64-1.d: Update.
index 3ccb7e2e2baec09f871216ce47eccffe2bb62812..946cf9e9629185701d1a8eb087b4348c844090a2 100644 (file)
@@ -88,6 +88,13 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
        run_dump_test "tlsnopic"
     }
 
+    # This is a PE specific test.
+    if { [istarget "*-*-cygwin*"] || [istarget "*-*-pe"]
+        || [istarget "*-*-mingw*"]
+    } then {
+       run_dump_test "secrel"
+    }
+
     set ASFLAGS "$old_ASFLAGS"
 }
 
diff --git a/gas/testsuite/gas/i386/secrel.d b/gas/testsuite/gas/i386/secrel.d
new file mode 100644 (file)
index 0000000..7df55f7
--- /dev/null
@@ -0,0 +1,43 @@
+#objdump: -rs\r
+#name: i386 secrel reloc\r
+\r
+.*: +file format pe-i386\r
+\r
+RELOCATION RECORDS FOR \[\.data\]:\r
+OFFSET   TYPE              VALUE \r
+00000024 secrel32          \.text\r
+00000029 secrel32          \.text\r
+0000002e secrel32          \.text\r
+00000033 secrel32          \.text\r
+00000044 secrel32          \.data\r
+00000049 secrel32          \.data\r
+0000004e secrel32          \.data\r
+00000053 secrel32          \.data\r
+00000064 secrel32          \.rdata\r
+00000069 secrel32          \.rdata\r
+0000006e secrel32          \.rdata\r
+00000073 secrel32          \.rdata\r
+00000084 secrel32          ext24\r
+00000089 secrel32          ext2d\r
+0000008e secrel32          ext36\r
+00000093 secrel32          ext3f\r
+\r
+\r
+Contents of section \.text:\r
+ 0000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 0010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+Contents of section \.data:\r
+ 0000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 0010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 0020 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 0030 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 0040 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 0050 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 0060 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 0070 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 0080 3e3e3e3e 00000000 11000000 00110000  >>>>............\r
+ 0090 00001100 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+Contents of section \.rdata:\r
+ 0000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 0010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 0020 3e3e3e3e                             >>>>            \r
diff --git a/gas/testsuite/gas/i386/secrel.s b/gas/testsuite/gas/i386/secrel.s
new file mode 100644 (file)
index 0000000..eaf59cd
--- /dev/null
@@ -0,0 +1,77 @@
+.text\r
+\r
+       .ascii ">>>>"\r
+pre04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+pre0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+pre16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+pre1f: .ascii "<"\r
+\r
+.data\r
+\r
+       .ascii ">>>>"\r
+sam04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+sam0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+sam16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+sam1f: .ascii "<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 pre04\r
+       .byte 0x11\r
+       .secrel32 pre0d\r
+       .byte 0x11\r
+       .secrel32 pre16\r
+       .byte 0x11\r
+       .secrel32 pre1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 sam04\r
+       .byte 0x11\r
+       .secrel32 sam0d\r
+       .byte 0x11\r
+       .secrel32 sam16\r
+       .byte 0x11\r
+       .secrel32 sam1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 nex04\r
+       .byte 0x11\r
+       .secrel32 nex0d\r
+       .byte 0x11\r
+       .secrel32 nex16\r
+       .byte 0x11\r
+       .secrel32 nex1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 ext24\r
+       .byte 0x11\r
+       .secrel32 ext2d\r
+       .byte 0x11\r
+       .secrel32 ext36\r
+       .byte 0x11\r
+       .secrel32 ext3f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+.section .rdata\r
+\r
+       .ascii ">>>>"\r
+nex04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+nex0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+nex16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+nex1f: .ascii "<"\r
+       .ascii ">>>>"\r
index 33163834229ec22f6b0f92e53e2a5048b0844d7f..2c88deecd5551c659acc577d354fb9fa30936422 100644 (file)
@@ -1,3 +1,6 @@
+2004-04-20  DJ Delorie  <dj@redhat.com>
+
+       * internal.h (R_SECREL32): Add.
 
 For older changes see ChangeLog-9103
 \f
index 2d41bf9a5f4809742c82ec4304ede9f6b6ac15a7..710e932c708cbbe062ccc340b5e4dffe88032c23 100644 (file)
@@ -607,6 +607,7 @@ struct internal_reloc
 #define R_REL24          5
 #define R_DIR32         6
 #define R_IMAGEBASE     7
+#define R_SECREL32     11
 #define R_RELBYTE      15
 #define R_RELWORD      16
 #define R_RELLONG      17
index 1849b2070a076c75a97c291df1015bc10f179694..d6828351b2fe3fea2714c755f2467e8e352f52a8 100644 (file)
@@ -1,3 +1,11 @@
+2004-04-14  Brian Ford  <ford@vss.fsi.com>
+           DJ Delorie  <dj@redhat.com>
+
+       * ld-pe/pe.exp: New, tests for i?86 PE.
+       * ld-pe/secrel1.s: New, test R_SECREL32 reloc.
+       * ld-pe/secrel2.s: Likewise.
+       * ld-pe/secrel.d: Likewise.
+
 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
 
        * ld-elfvsb/elfvsb.exp: XFAIL some tests on sparc64.
diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp
new file mode 100644 (file)
index 0000000..cbdae79
--- /dev/null
@@ -0,0 +1,31 @@
+# Expect script for export table in executables tests\r
+#   Copyright 2004\r
+#   Free Software Foundation, Inc.\r
+#\r
+# This file is free software; you can redistribute it and/or modify\r
+# it under the terms of the GNU General Public License as published by\r
+# the Free Software Foundation; either version 2 of the License, or\r
+# (at your option) any later version.\r
+# \r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+# GNU General Public License for more details.\r
+# \r
+# You should have received a copy of the GNU General Public License\r
+# along with this program; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
+#\r
\r
+# This test can only be run on i386 PE/COFF platforms.\r
+if { ![istarget i*86-*-cygwin*] && ![istarget i*86-*-pe]\r
+     && ![istarget i*86-*-mingw*] } {\r
+    return\r
+}\r
+\r
+set pe_tests {\r
+    {".secrel32" "" "" {secrel1.s secrel2.s}\r
+     {{objdump -s secrel.d}} "secrel.x"}\r
+}\r
+\r
+run_ld_link_tests $pe_tests\r
diff --git a/ld/testsuite/ld-pe/secrel.d b/ld/testsuite/ld-pe/secrel.d
new file mode 100644 (file)
index 0000000..9c5d9a3
--- /dev/null
@@ -0,0 +1,27 @@
+\r
+tmpdir/secrel\.x:     file format pei-i386\r
+\r
+Contents of section \.text:\r
+ 401000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 401010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 401020 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 401030 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 401040 ........ ........ ........ ........  ................\r
+Contents of section \.data:\r
+ 402000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 402010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 402020 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 402030 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 402040 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 402050 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 402060 3e3e3e3e 04000000 110d0000 00111600  >>>>............\r
+ 402070 0000111f 00000011 3c3c3c3c 3c3c3c3c  ........<<<<<<<<\r
+ 402080 3e3e3e3e 24000000 112d0000 00113600  >>>>\$....-....6.\r
+ 402090 0000113f 00000011 3c3c3c3c 3c3c3c3c  ...\?....<<<<<<<<\r
+Contents of section \.rdata:\r
+ 403000 3e3e3e3e 3c3c3c3c 3e3e3e3e 3e3c3c3c  >>>><<<<>>>>><<<\r
+ 403010 3e3e3e3e 3e3e3c3c 3e3e3e3e 3e3e3e3c  >>>>>><<>>>>>>><\r
+ 403020 3e3e3e3e                             >>>>            \r
+Contents of section \.idata:\r
+ 404000 00000000 00000000 00000000 00000000  ................\r
+ 404010 00000000                             ....            \r
diff --git a/ld/testsuite/ld-pe/secrel1.s b/ld/testsuite/ld-pe/secrel1.s
new file mode 100644 (file)
index 0000000..eaf59cd
--- /dev/null
@@ -0,0 +1,77 @@
+.text\r
+\r
+       .ascii ">>>>"\r
+pre04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+pre0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+pre16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+pre1f: .ascii "<"\r
+\r
+.data\r
+\r
+       .ascii ">>>>"\r
+sam04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+sam0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+sam16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+sam1f: .ascii "<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 pre04\r
+       .byte 0x11\r
+       .secrel32 pre0d\r
+       .byte 0x11\r
+       .secrel32 pre16\r
+       .byte 0x11\r
+       .secrel32 pre1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 sam04\r
+       .byte 0x11\r
+       .secrel32 sam0d\r
+       .byte 0x11\r
+       .secrel32 sam16\r
+       .byte 0x11\r
+       .secrel32 sam1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 nex04\r
+       .byte 0x11\r
+       .secrel32 nex0d\r
+       .byte 0x11\r
+       .secrel32 nex16\r
+       .byte 0x11\r
+       .secrel32 nex1f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+       .ascii ">>>>"\r
+       .secrel32 ext24\r
+       .byte 0x11\r
+       .secrel32 ext2d\r
+       .byte 0x11\r
+       .secrel32 ext36\r
+       .byte 0x11\r
+       .secrel32 ext3f\r
+       .byte 0x11\r
+       .ascii "<<<<<<<<"\r
+\r
+.section .rdata\r
+\r
+       .ascii ">>>>"\r
+nex04: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+nex0d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+nex16: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+nex1f: .ascii "<"\r
+       .ascii ">>>>"\r
diff --git a/ld/testsuite/ld-pe/secrel2.s b/ld/testsuite/ld-pe/secrel2.s
new file mode 100644 (file)
index 0000000..a1f871f
--- /dev/null
@@ -0,0 +1,14 @@
+.text\r
+\r
+       .ascii ">>>>"\r
+.global ext24\r
+ext24: .ascii "<<<<"\r
+       .ascii ">>>>>"\r
+.global ext2d\r
+ext2d: .ascii "<<<"\r
+       .ascii ">>>>>>"\r
+.global ext36\r
+ext36: .ascii "<<"\r
+       .ascii ">>>>>>>"\r
+.global ext3f\r
+ext3f: .ascii "<"\r
This page took 0.219321 seconds and 4 git commands to generate.