This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Question about vtentry on s390
- From: Andreas Jaeger <aj at suse dot de>
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 25 Nov 2001 15:31:35 +0100
- Subject: Question about vtentry on s390
Martin,
looking at elf64-s390.c nd elf32-s390.c I noticed in
elf_s390_check_relocs the following:
case R_390_GNU_VTENTRY:
if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_offset))
return false;
break;
AFAIK this should be r_addend instead of r_offset. Can you double
check that the following patch is correct?
I'm currently changing the x86-64 bfd sources and noticed this while
looking at your files. For me the ld/selective Tests 4 and 5 failed
if I use r_offset - setting it to r_addend (like all others rela
targets do) seems to be the right thing.
Btw. elflink.h has:
boolean
elf_gc_record_vtentry (abfd, sec, h, addend)
I haven't checked the appended patch since I don't have a S390 at
home;-) Can you please do so and tell me whether I should commit this
patch?
Thanks,
Andreas
2001-11-25 Andreas Jaeger <aj@suse.de>
* elf32-s390.c (elf_s390_check_relocs): Pass addend to
gc_record_vtentry.
* elf64-s390.c (elf_s390_check_relocs): Likewise.
============================================================
Index: bfd/elf64-s390.c
--- bfd/elf64-s390.c 2001/11/23 12:17:17 1.14
+++ bfd/elf64-s390.c 2001/11/25 14:31:17
@@ -839,7 +839,7 @@
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_390_GNU_VTENTRY:
- if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return false;
break;
============================================================
Index: bfd/elf32-s390.c
--- bfd/elf32-s390.c 2001/11/23 12:17:16 1.14
+++ bfd/elf32-s390.c 2001/11/25 14:31:19
@@ -868,7 +868,7 @@
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_390_GNU_VTENTRY:
- if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return false;
break;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj