From: Richard Sandiford Date: Sat, 14 Mar 2009 09:32:56 +0000 (+0000) Subject: bfd/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4037431e0ee0a46a4b8717ee6de97546143995b;p=binutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9e7b00f8dc6..6f9011a1541 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index aacd0782cf8..39d278ec6dd 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 ebb5120a298..0edc58b31cf 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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, 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 00000000000..6c5022a44b8 --- /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 00000000000..003c7964582 --- /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 2178316fa13..10e20311955 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"