public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness
@ 2021-08-06 18:27 i at maskray dot me
  2021-08-06 18:27 ` [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} " i at maskray dot me
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-08-06 18:27 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28203

            Bug ID: 28203
           Summary: aarch64: elf_machine_{load_address,dynamic} should
                    drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start
                    for robustness
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

The AArch64 ABI is largely platform agnostic and does not specify
_GLOBAL_OFFSET_TABLE_[0] ([1]). glibc ld.so turns out to be probably the
only user of _GLOBAL_OFFSET_TABLE_[0] and GNU ld defines the value
to the link-time address _DYNAMIC. [2]

In 2012, __ehdr_start was implemented in GNU ld and gold.
Using adrp+addr to access __ehdr_start/_DYNAMIC gives us a robust way to get
the
load address and the link-time address of _DYNAMIC.


With _GLOBAL_OFFSET_TABLE_[0] removed, my LLD linked glibc does not have more
`make check` failures than GNU ld linked glibc.


[1]: From a psABI maintainer, https://bugs.llvm.org/show_bug.cgi?id=49672#c2
[2]: LLD's aarch64 port does not set _GLOBAL_OFFSET_TABLE_[0] to the
link-time address _DYNAMIC.
LLD is widely used on aarch64 Android and ChromeOS devices.  Software
just works without the need for _GLOBAL_OFFSET_TABLE_[0].

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness
  2021-08-06 18:27 [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness i at maskray dot me
@ 2021-08-06 18:27 ` i at maskray dot me
  2021-08-06 18:50 ` i at maskray dot me
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-08-06 18:27 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28203

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |aarch64-*

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness
  2021-08-06 18:27 [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness i at maskray dot me
  2021-08-06 18:27 ` [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} " i at maskray dot me
@ 2021-08-06 18:50 ` i at maskray dot me
  2021-08-11 21:11 ` i at maskray dot me
  2021-08-12  7:37 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-08-06 18:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28203

--- Comment #1 from Fangrui Song <i at maskray dot me> ---
https://sourceware.org/pipermail/libc-alpha/2021-August/129904.html 
[PATCH] aarch64: Make elf_machine_{load_address, dynamic} robust [BZ #28203]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness
  2021-08-06 18:27 [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness i at maskray dot me
  2021-08-06 18:27 ` [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} " i at maskray dot me
  2021-08-06 18:50 ` i at maskray dot me
@ 2021-08-11 21:11 ` i at maskray dot me
  2021-08-12  7:37 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: i at maskray dot me @ 2021-08-11 21:11 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28203

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Fangrui Song <i at maskray dot me> ---
Fixed by
https://sourceware.org/git/?p=glibc.git;a=commit;h=43d06ed218fc8be58987bdfd00e21e5720f0b862

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness
  2021-08-06 18:27 [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness i at maskray dot me
                   ` (2 preceding siblings ...)
  2021-08-11 21:11 ` i at maskray dot me
@ 2021-08-12  7:37 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-08-12  7:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28203

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-
                 CC|                            |fweimer at redhat dot com
   Target Milestone|---                         |2.35

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-12  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 18:27 [Bug dynamic-link/28203] New: aarch64: elf_machine_{load_address,dynamic} should drop _GLOBAL_OFFSET_TABLE_[0] in favor of __ehdr_start for robustness i at maskray dot me
2021-08-06 18:27 ` [Bug dynamic-link/28203] aarch64: elf_machine_{load_address, dynamic} " i at maskray dot me
2021-08-06 18:50 ` i at maskray dot me
2021-08-11 21:11 ` i at maskray dot me
2021-08-12  7:37 ` fweimer at redhat dot com

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).