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 9e7b00f8dc6a7a451d486a8eb0cf22369354ea64..6f9011a1541bb54f600f677bf1d771d3e2cb74a9 100644 (file)
@@ -1,3 +1,8 @@
+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.
index aacd0782cf805309d95c0d62214a408faa5e3f3c..39d278ec6dd1596578e673fa32a1550c3344a2d1 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 ebb5120a298466dcca4ace762dda6a06dd859b58..0edc58b31cf4b2ffe82ac5e9d16e7d430b255c68 100644 (file)
@@ -1,3 +1,9 @@
+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,
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 2178316fa13a19b36614d1840f3db636048d630b..10e203119553924cc0e01b3be79d2b761a5df885 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"