mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-03 17:51:57 +00:00
Properly adjust h->plt.refcount
bfd/ PR ld/14980 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly adjust h->plt.refcount. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. ld/testsuite/ PR ld/14980 * ld-ifunc/ifunc-14c.s: New file. * ld-ifunc/ifunc-14e-i386.d: Likewise. * ld-ifunc/ifunc-14e-x86-64.d: Likewise. * ld-ifunc/ifunc-14f-i386.d: Likewise. * ld-ifunc/ifunc-14f-x86-64.d: Likewise.
This commit is contained in:
parent
edcac0c105
commit
a5479e5ff4
@ -1,3 +1,10 @@
|
||||
2012-12-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/14980
|
||||
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly
|
||||
adjust h->plt.refcount.
|
||||
* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
|
||||
|
||||
2012-12-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-i386.c (elf_i386_relocate_section): Replace
|
||||
|
@ -2031,8 +2031,11 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
|
||||
if (pc_count || count)
|
||||
{
|
||||
h->needs_plt = 1;
|
||||
h->plt.refcount += 1;
|
||||
h->non_got_ref = 1;
|
||||
if (h->plt.refcount <= 0)
|
||||
h->plt.refcount = 1;
|
||||
else
|
||||
h->plt.refcount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2090,8 +2090,11 @@ elf_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
|
||||
if (pc_count || count)
|
||||
{
|
||||
h->needs_plt = 1;
|
||||
h->plt.refcount += 1;
|
||||
h->non_got_ref = 1;
|
||||
if (h->plt.refcount <= 0)
|
||||
h->plt.refcount = 1;
|
||||
else
|
||||
h->plt.refcount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
2012-12-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/14980
|
||||
* ld-ifunc/ifunc-14c.s: New file.
|
||||
* ld-ifunc/ifunc-14e-i386.d: Likewise.
|
||||
* ld-ifunc/ifunc-14e-x86-64.d: Likewise.
|
||||
* ld-ifunc/ifunc-14f-i386.d: Likewise.
|
||||
* ld-ifunc/ifunc-14f-x86-64.d: Likewise.
|
||||
|
||||
2012-12-19 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR ld/14962
|
||||
|
7
ld/testsuite/ld-ifunc/ifunc-14c.s
Normal file
7
ld/testsuite/ld-ifunc/ifunc-14c.s
Normal file
@ -0,0 +1,7 @@
|
||||
.text
|
||||
.globl xxx
|
||||
.type xxx, @function
|
||||
xxx:
|
||||
jmp foo
|
||||
.size xxx, .-xxx
|
||||
.hidden foo
|
12
ld/testsuite/ld-ifunc/ifunc-14e-i386.d
Normal file
12
ld/testsuite/ld-ifunc/ifunc-14e-i386.d
Normal file
@ -0,0 +1,12 @@
|
||||
#source: ifunc-14a.s
|
||||
#source: ifunc-14c.s
|
||||
#source: ifunc-14b.s
|
||||
#ld: -shared -m elf_i386 -z nocombreloc
|
||||
#as: --32
|
||||
#readelf: -r --wide
|
||||
#target: x86_64-*-* i?86-*-*
|
||||
|
||||
#failif
|
||||
#...
|
||||
.* +R_386_NONE +.*
|
||||
#...
|
12
ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d
Normal file
12
ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d
Normal file
@ -0,0 +1,12 @@
|
||||
#source: ifunc-14a.s
|
||||
#source: ifunc-14c.s
|
||||
#source: ifunc-14b.s
|
||||
#ld: -shared -m elf_x86_64 -z nocombreloc
|
||||
#as: --64
|
||||
#readelf: -r --wide
|
||||
#target: x86_64-*-*
|
||||
|
||||
#failif
|
||||
#...
|
||||
.* +R_X86_64_NONE +.*
|
||||
#...
|
12
ld/testsuite/ld-ifunc/ifunc-14f-i386.d
Normal file
12
ld/testsuite/ld-ifunc/ifunc-14f-i386.d
Normal file
@ -0,0 +1,12 @@
|
||||
#source: ifunc-14a.s
|
||||
#source: ifunc-14b.s
|
||||
#source: ifunc-14c.s
|
||||
#ld: -shared -m elf_i386 -z nocombreloc
|
||||
#as: --32
|
||||
#readelf: -r --wide
|
||||
#target: x86_64-*-* i?86-*-*
|
||||
|
||||
#failif
|
||||
#...
|
||||
.* +R_386_NONE +.*
|
||||
#...
|
12
ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d
Normal file
12
ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d
Normal file
@ -0,0 +1,12 @@
|
||||
#source: ifunc-14a.s
|
||||
#source: ifunc-14b.s
|
||||
#source: ifunc-14c.s
|
||||
#ld: -shared -m elf_x86_64 -z nocombreloc
|
||||
#as: --64
|
||||
#readelf: -r --wide
|
||||
#target: x86_64-*-*
|
||||
|
||||
#failif
|
||||
#...
|
||||
.* +R_X86_64_NONE +.*
|
||||
#...
|
Loading…
Reference in New Issue
Block a user