mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-03-04 23:48:44 +00:00
bfd/
* xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy R_POS and R_NEG relocations against absolute symbols to the .loader section. ld/testsuite/ * ld-powerpc/aix-abs-reloc-1.ex, ld-powerpc/aix-abs-reloc-1.im, ld-powerpc/aix-abs-reloc-1.od, ld-powerpc/aix-abs-reloc-1.s: New test. * ld-powerpc/aix52.exp: Run it.
This commit is contained in:
parent
62008a1686
commit
0e3212aded
@ -1,3 +1,9 @@
|
||||
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||
|
||||
* xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
|
||||
R_POS and R_NEG relocations against absolute symbols to the
|
||||
.loader section.
|
||||
|
||||
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||
|
||||
* coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
|
||||
|
@ -2335,6 +2335,11 @@ xcoff_mark (struct bfd_link_info *info, asection *sec)
|
||||
case R_NEG:
|
||||
case R_RL:
|
||||
case R_RLA:
|
||||
if (h != NULL
|
||||
&& (h->root.type == bfd_link_hash_defined
|
||||
|| h->root.type == bfd_link_hash_defweak)
|
||||
&& bfd_is_abs_section (h->root.u.def.section))
|
||||
break;
|
||||
++xcoff_hash_table (info)->ldrel_count;
|
||||
if (h != NULL)
|
||||
h->flags |= XCOFF_LDREL;
|
||||
@ -4460,6 +4465,11 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo,
|
||||
case R_NEG:
|
||||
case R_RL:
|
||||
case R_RLA:
|
||||
if (h != NULL
|
||||
&& (h->root.type == bfd_link_hash_defined
|
||||
|| h->root.type == bfd_link_hash_defweak)
|
||||
&& bfd_is_abs_section (h->root.u.def.section))
|
||||
break;
|
||||
/* This reloc needs to be copied into the .loader
|
||||
section. */
|
||||
ldrel.l_vaddr = irel->r_vaddr;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||
|
||||
* ld-powerpc/aix-abs-reloc-1.ex, ld-powerpc/aix-abs-reloc-1.im,
|
||||
ld-powerpc/aix-abs-reloc-1.od, ld-powerpc/aix-abs-reloc-1.s: New test.
|
||||
* ld-powerpc/aix52.exp: Run it.
|
||||
|
||||
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||
|
||||
* ld-powerpc/aix-core-sec-1.s, ld-powerpc/aix-core-sec-1.ex,
|
||||
|
1
ld/testsuite/ld-powerpc/aix-abs-reloc-1.ex
Normal file
1
ld/testsuite/ld-powerpc/aix-abs-reloc-1.ex
Normal file
@ -0,0 +1 @@
|
||||
foo
|
1
ld/testsuite/ld-powerpc/aix-abs-reloc-1.im
Normal file
1
ld/testsuite/ld-powerpc/aix-abs-reloc-1.im
Normal file
@ -0,0 +1 @@
|
||||
bar 0xdeadbeef
|
7
ld/testsuite/ld-powerpc/aix-abs-reloc-1.od
Normal file
7
ld/testsuite/ld-powerpc/aix-abs-reloc-1.od
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
.*
|
||||
|
||||
DYNAMIC RELOCATION RECORDS \(none\)
|
||||
|
||||
Contents of section \.data:
|
||||
10000000 deadbeef .*
|
4
ld/testsuite/ld-powerpc/aix-abs-reloc-1.s
Normal file
4
ld/testsuite/ld-powerpc/aix-abs-reloc-1.s
Normal file
@ -0,0 +1,4 @@
|
||||
.globl foo
|
||||
.csect foo[RW]
|
||||
foo:
|
||||
.long bar
|
@ -65,6 +65,12 @@ proc run_aix_test { size name ldopts asopts sources tools output } {
|
||||
}
|
||||
|
||||
set aix52tests {
|
||||
{"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}}
|
||||
"aix-abs-reloc-1.so"}
|
||||
|
||||
{"Core sections test 1" "-shared -bE:aix-core-sec-1.ex"
|
||||
"" {aix-core-sec-1.s}
|
||||
{{objdump -h aix-core-sec-1.hd}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user