]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gold/i386.cc
PR16794, gold ignores R_386_GOTOFF addend
authorAlan Modra <amodra@gmail.com>
Wed, 11 Sep 2019 03:52:42 +0000 (13:22 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 28 Sep 2019 07:17:52 +0000 (16:47 +0930)
commitea8e302e12bd155a3acd79290ec87d7dda2cce61
treee853d2a083965ab1b5895d1b5597883a4051fb0c
parentcd5f43ff5db7b67009404aee4606eee603fb3f68
PR16794, gold ignores R_386_GOTOFF addend

An R_386_GOTOFF relocation has an addend, typically used when a
symbol can be replaced by its section symbol plus an offset.
psymval->value(object,0) is quite wrong then, fix it.

PR 16794
* i386.cc (Target_i386::Relocate::relocate <R_386_GOTOFF>): Don't
ignore addend, apply using pcrel32.
* x86_64.cc (Target_x86_64::Relocate::relocate <R_X86_64_GOTOFF64>):
Similarly use pcrel64.
gold/ChangeLog
gold/i386.cc
gold/x86_64.cc