public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: [PATCH] arm: Don't check _DYNAMIC in elf_machine_load_address
Date: Tue, 03 Oct 2017 22:48:00 -0000	[thread overview]
Message-ID: <20171003224847.GA27187@gmail.com> (raw)

Since arm can't convert access _DYNAMIC via GOT, which needs dynamic
relocation, to PC-relative at link-time, don't check _DYNAMIC in
elf_machine_load_address.

I am checking it in.

H.J.
        * sysdeps/arm/dl-machine.h (elf_machine_load_address): Don't
        check _DYNAMIC.
---
 sysdeps/arm/dl-machine.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index efe2e1b3a3..7e2d73e3d4 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -59,9 +59,6 @@ elf_machine_load_address (void)
   Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
   asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
 #else
-  extern Elf32_Dyn _DYNAMIC[] __attribute__((weak, visibility ("hidden")));
-  if (!_DYNAMIC)
-    return 0;
   extern Elf32_Addr __dl_relocate_static_pie (void *)
     asm ("_dl_relocate_static_pie") attribute_hidden;
   Elf32_Addr got_addr = (Elf32_Addr) &__dl_relocate_static_pie;
-- 
2.13.6

                 reply	other threads:[~2017-10-03 22:48 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=20171003224847.GA27187@gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=libc-alpha@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: link
Be 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).