bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Sat, 14 Mar 2009 09:32:56 +0000 (09:32 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Sat, 14 Mar 2009 09:32:56 +0000 (09:32 +0000)
* xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
symbols as XMC_XO.

ld/testsuite/
* ld-powerpc/aix-abs-branch-1.nd,
ld-powerpc/aix-abs-reloc-1.nd: New tests.
* ld-powerpc/aix52.exp: Run them.

bfd/ChangeLog
bfd/xcofflink.c
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/aix-abs-branch-1.nd [new file with mode: 0644]
ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd [new file with mode: 0644]
ld/testsuite/ld-powerpc/aix52.exp

index 9e7b00f..6f9011a 100644 (file)
@@ -1,5 +1,10 @@
 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
 
+       * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
+       symbols as XMC_XO.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
        * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
        * libcoff.h: Regenerate.
        * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
index aacd078..39d278e 100644 (file)
@@ -2723,6 +2723,7 @@ bfd_xcoff_import_symbol (bfd *output_bfd,
       h->root.type = bfd_link_hash_defined;
       h->root.u.def.section = bfd_abs_section_ptr;
       h->root.u.def.value = val;
+      h->smclas = XMC_XO;
     }
 
   if (!xcoff_set_import_path (info, h, imppath, impfile, impmember))
index ebb5120..0edc58b 100644 (file)
@@ -1,5 +1,11 @@
 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
 
+       * ld-powerpc/aix-abs-branch-1.nd,
+       ld-powerpc/aix-abs-reloc-1.nd: New tests.
+       * ld-powerpc/aix52.exp: Run them.
+
+2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
+
        * ld-powerpc/aix-lineno-1.s, ld-powerpc/aix-lineno-1.txt,
        ld-powerpc/aix-lineno-1a.dd, ld-powerpc/aix-lineno-1a.nd,
        ld-powerpc/aix-lineno-1b.dd, ld-powerpc/aix-lineno-1b.nd: New tests.
diff --git a/ld/testsuite/ld-powerpc/aix-abs-branch-1.nd b/ld/testsuite/ld-powerpc/aix-abs-branch-1.nd
new file mode 100644 (file)
index 0000000..6c5022a
--- /dev/null
@@ -0,0 +1,3 @@
+0*01450000 C bar
+0*10000000 t foo
+0*10000000 T foo
diff --git a/ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd b/ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd
new file mode 100644 (file)
index 0000000..003c796
--- /dev/null
@@ -0,0 +1,3 @@
+0*deadbeef C bar
+0*10000000 d foo
+0*10000000 D foo
index 2178316..10e2031 100644 (file)
@@ -72,13 +72,13 @@ set aix52tests {
     {"Absolute branch test 1"
      "-shared -bI:aix-abs-branch-1.im -bE:aix-abs-branch-1.ex"
      "" {aix-abs-branch-1.s}
-     {{objdump {-dR} aix-abs-branch-1.dd}}
+     {{objdump {-dR} aix-abs-branch-1.dd} {nm {} aix-abs-branch-1.nd}}
      "aix-abs-branch-1.so"}
 
     {"Relocations against absolute symbols 1"
      "-shared -bI:aix-abs-reloc-1.im -bE:aix-abs-reloc-1.ex"
      {} {aix-abs-reloc-1.s}
-     {{objdump -sRj.data aix-abs-reloc-1.od}}
+     {{objdump -sRj.data aix-abs-reloc-1.od} {nm {} aix-abs-reloc-1.nd}}
      "aix-abs-reloc-1.so"}
 
     {"Core sections test 1" "-shared -bE:aix-core-sec-1.ex"