summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2006-03-02 09:44:23 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2006-03-02 09:44:23 +0000
commit4691f8075ba0f6e2505884e7a1e2a039a1ad8d25 (patch)
tree4115bf320f985da266c07c42bab57e4669556c0e
parentf904d70b2126906a50b92465813672c7c118f751 (diff)
downloadbinutils-redhat-4691f8075ba0f6e2505884e7a1e2a039a1ad8d25.tar.gz
bfd/
* elf32-ppc.c (is_ppc_elf_target): Return true if the target is bfd_elf32_powerpc_vxworks_vec. ld/testsuite/ * ld-i386/vxworks1.ld (.data): New section. * ld-i386/vxworks1-lib.s: Add a pointer to a local symbol. * ld-i386/vxworks1-lib.rd: Test for the associated reloc. * ld-powerpc/vxworks1.ld (.data): New section. * ld-powerpc/vxworks1-lib.s: Add a pointer to a local symbol. * ld-powerpc/vxworks1-lib.rd: Test for the associated reloc.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c5
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-i386/vxworks1-lib.rd3
-rw-r--r--ld/testsuite/ld-i386/vxworks1-lib.s3
-rw-r--r--ld/testsuite/ld-i386/vxworks1.ld3
-rw-r--r--ld/testsuite/ld-powerpc/vxworks1-lib.rd3
-rw-r--r--ld/testsuite/ld-powerpc/vxworks1-lib.s3
-rw-r--r--ld/testsuite/ld-powerpc/vxworks1.ld3
9 files changed, 34 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5f3191ced2..1797c8451d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
+ bfd_elf32_powerpc_vxworks_vec.
+
2006-03-02 Nick Clifton <nickc@redhat.com>
* elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 68cead29e0..b3d8308fb0 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2679,9 +2679,12 @@ static bfd_boolean
is_ppc_elf_target (const struct bfd_target *targ)
{
extern const bfd_target bfd_elf32_powerpc_vec;
+ extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
- return targ == &bfd_elf32_powerpc_vec || targ == &bfd_elf32_powerpcle_vec;
+ return (targ == &bfd_elf32_powerpc_vec
+ || targ == &bfd_elf32_powerpc_vxworks_vec
+ || targ == &bfd_elf32_powerpcle_vec);
}
/* Hook called by the linker routine which adds symbols from an object
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b3a93ad814..a7dabafefe 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2006-03-02 Richard Sandiford <richard@codesourcery.com>
+ * ld-i386/vxworks1.ld (.data): New section.
+ * ld-i386/vxworks1-lib.s: Add a pointer to a local symbol.
+ * ld-i386/vxworks1-lib.rd: Test for the associated reloc.
+ * ld-powerpc/vxworks1.ld (.data): New section.
+ * ld-powerpc/vxworks1-lib.s: Add a pointer to a local symbol.
+ * ld-powerpc/vxworks1-lib.rd: Test for the associated reloc.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
* ld-i386/ld-i386/vxworks1-lib.nd: New test.
* ld-i386/i386.exp: Run it.
* ld-powerpc/ld-powerpc/vxworks1-lib.nd: New test.
diff --git a/ld/testsuite/ld-i386/vxworks1-lib.rd b/ld/testsuite/ld-i386/vxworks1-lib.rd
index c86ec1d662..ab567b6e72 100644
--- a/ld/testsuite/ld-i386/vxworks1-lib.rd
+++ b/ld/testsuite/ld-i386/vxworks1-lib.rd
@@ -4,8 +4,9 @@ Relocation section '\.rel\.plt' at offset .* contains 2 entries:
0008140c .*07 R_386_JUMP_SLOT 00000000 sexternal
00081410 .*07 R_386_JUMP_SLOT 00080c27 sglobal
-Relocation section '\.rel\.dyn' at offset .* contains 3 entries:
+Relocation section '\.rel\.dyn' at offset .* contains 4 entries:
Offset Info Type Sym\.Value Sym\. Name
+00081c00 00000008 R_386_RELATIVE *
00080c03 .*01 R_386_32 00000000 __GOTT_BASE__
00080c09 .*01 R_386_32 00000000 __GOTT_INDEX__
00081414 .*06 R_386_GLOB_DAT 00081800 x
diff --git a/ld/testsuite/ld-i386/vxworks1-lib.s b/ld/testsuite/ld-i386/vxworks1-lib.s
index d2bbac074d..f9f05dc2ec 100644
--- a/ld/testsuite/ld-i386/vxworks1-lib.s
+++ b/ld/testsuite/ld-i386/vxworks1-lib.s
@@ -25,4 +25,7 @@ sglobal:
ret
.size sglobal, .-sglobal
+ .data
+ .4byte slocal
+
.comm x,4,4
diff --git a/ld/testsuite/ld-i386/vxworks1.ld b/ld/testsuite/ld-i386/vxworks1.ld
index 4e31523f7e..ff25b39a54 100644
--- a/ld/testsuite/ld-i386/vxworks1.ld
+++ b/ld/testsuite/ld-i386/vxworks1.ld
@@ -24,4 +24,7 @@ SECTIONS
. = ALIGN (0x400);
.bss : { *(.bss) *(.dynbss) }
+
+ . = ALIGN (0x400);
+ .data : { *(.data) }
}
diff --git a/ld/testsuite/ld-powerpc/vxworks1-lib.rd b/ld/testsuite/ld-powerpc/vxworks1-lib.rd
index 17087f1bf5..2aaf8783a1 100644
--- a/ld/testsuite/ld-powerpc/vxworks1-lib.rd
+++ b/ld/testsuite/ld-powerpc/vxworks1-lib.rd
@@ -4,8 +4,9 @@ Relocation section '\.rela\.plt' at offset .* contains 2 entries:
0008140c .*15 R_PPC_JMP_SLOT 00000000 sexternal \+ 0
00081410 .*15 R_PPC_JMP_SLOT 00080c48 sglobal \+ 0
-Relocation section '\.rela\.dyn' at offset .* contains 4 entries:
+Relocation section '\.rela\.dyn' at offset .* contains 5 entries:
Offset Info Type Sym\.Value Sym\. Name \+ Addend
+00081c00 00000016 R_PPC_RELATIVE * 00080c44
00080c0e .*06 R_PPC_ADDR16_HA 00000000 __GOTT_BASE__ \+ 0
00080c12 .*04 R_PPC_ADDR16_LO 00000000 __GOTT_BASE__ \+ 0
00080c16 .*03 R_PPC_ADDR16 00000000 __GOTT_INDEX__ \+ 0
diff --git a/ld/testsuite/ld-powerpc/vxworks1-lib.s b/ld/testsuite/ld-powerpc/vxworks1-lib.s
index 8e286c17e1..9dfcb0fe36 100644
--- a/ld/testsuite/ld-powerpc/vxworks1-lib.s
+++ b/ld/testsuite/ld-powerpc/vxworks1-lib.s
@@ -32,4 +32,7 @@ sglobal:
blr
.size sglobal, .-sglobal
+ .data
+ .4byte slocal
+
.comm x,4,4
diff --git a/ld/testsuite/ld-powerpc/vxworks1.ld b/ld/testsuite/ld-powerpc/vxworks1.ld
index 540e0ebe5b..69fe0446e3 100644
--- a/ld/testsuite/ld-powerpc/vxworks1.ld
+++ b/ld/testsuite/ld-powerpc/vxworks1.ld
@@ -24,4 +24,7 @@ SECTIONS
. = ALIGN (0x400);
.bss : { *(.bss) }
+
+ . = ALIGN (0x400);
+ .data : { *(.data) }
}