public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT Date: Tue, 19 Jul 2022 05:10:55 +0000 (GMT) [thread overview] Message-ID: <20220719051055.76F3A385801D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f6bc52f080e4a0195c707c01f54e2eae0ff89010 commit f6bc52f080e4a0195c707c01f54e2eae0ff89010 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri May 20 19:21:48 2022 -0700 x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT According to x86-64 psABI, r_addend should be ignored for R_X86_64_GLOB_DAT and R_X86_64_JUMP_SLOT. Since linkers always set their r_addends to 0, we can ignore their r_addends. Reviewed-by: Fangrui Song <maskray@google.com> (cherry picked from commit f8587a61892cbafd98ce599131bf4f103466f084) Diff: --- sysdeps/x86_64/dl-machine.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h index 94296719d4..7426825171 100644 --- a/sysdeps/x86_64/dl-machine.h +++ b/sysdeps/x86_64/dl-machine.h @@ -347,11 +347,13 @@ and creates an unsatisfiable circular dependency.\n", # endif /* Set to symbol size plus addend. */ value = sym->st_size; + *reloc_addr = value + reloc->r_addend; + break; # endif - /* Fall through. */ + case R_X86_64_GLOB_DAT: case R_X86_64_JUMP_SLOT: - *reloc_addr = value + reloc->r_addend; + *reloc_addr = value; break; # ifndef RESOLVE_CONFLICT_FIND_MAP
reply other threads:[~2022-07-19 5:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220719051055.76F3A385801D@sourceware.org \ --to=skpgkp2@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).