From e4099f9414cd919633d37550b0f4202ad8a0de9b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 14 Mar 2009 09:32:56 +0000 Subject: [PATCH] bfd/ * 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 | 5 +++++ bfd/xcofflink.c | 1 + ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-powerpc/aix-abs-branch-1.nd | 3 +++ ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd | 3 +++ ld/testsuite/ld-powerpc/aix52.exp | 4 ++-- 6 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ld/testsuite/ld-powerpc/aix-abs-branch-1.nd create mode 100644 ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9e7b00f8dc..6f9011a154 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2009-03-14 Richard Sandiford + * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute + symbols as XMC_XO. + +2009-03-14 Richard Sandiford + * libcoff-in.h (xcoff_tdata): Add a lineno_counts field. * libcoff.h: Regenerate. * xcofflink.c (xcoff_link_add_symbols): Record per-symbol diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index aacd0782cf..39d278ec6d 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -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)) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index ebb5120a29..0edc58b31c 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2009-03-14 Richard Sandiford + * 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 + * 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 index 0000000000..6c5022a44b --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-branch-1.nd @@ -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 index 0000000000..003c796458 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-reloc-1.nd @@ -0,0 +1,3 @@ +0*deadbeef C bar +0*10000000 d foo +0*10000000 D foo diff --git a/ld/testsuite/ld-powerpc/aix52.exp b/ld/testsuite/ld-powerpc/aix52.exp index 2178316fa1..10e2031195 100644 --- a/ld/testsuite/ld-powerpc/aix52.exp +++ b/ld/testsuite/ld-powerpc/aix52.exp @@ -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" -- 2.11.0