public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28676] New: p_align on PT_LOAD segment in DSO isn't honored
@ 2021-12-08 23:51 hjl.tools at gmail dot com
  2021-12-09  1:11 ` [Bug dynamic-link/28676] " hjl.tools at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-08 23:51 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28676
           Summary: p_align on PT_LOAD segment in DSO isn't honored
           Product: glibc
           Version: 2.35
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

Created attachment 13838
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13838&action=edit
A testcase

[hjl@gnu-cfl-2 aligned-1]$ make 
gcc -pie -fPIE -Wl,-z,max-page-size=0x200000 -O2 -o pie main.c load.c
gcc -no-pie -Wl,-z,max-page-size=0x200000 -O2 -o pde main.c load.c
gcc -O2 -fPIC   -c -o load.o load.c
gcc -shared -Wl,-z,max-page-size=0x200000 -o libload.so load.o
gcc -no-pie -Wl,-z,max-page-size=0x200000 -O2 -o dso main.c libload.so -Wl,-R,.
./pde
foo: 0xe00000
./pie
foo: 0x55ea36a00000
./dso
foo: 0x7fafe6308000
make: *** [Makefile:8: all] Aborted (core dumped)
[hjl@gnu-cfl-2 aligned-1]$ 

Kernel loader honors 2MB p_align in PIE.  But ld.so doesn't honor 2MB p_align
in DSO.

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

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

end of thread, other threads:[~2022-01-24 14:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 23:51 [Bug dynamic-link/28676] New: p_align on PT_LOAD segment in DSO isn't honored hjl.tools at gmail dot com
2021-12-09  1:11 ` [Bug dynamic-link/28676] " hjl.tools at gmail dot com
2021-12-10 19:45 ` hjl.tools at gmail dot com
2021-12-13 15:00 ` fweimer at redhat dot com
2021-12-13 15:00 ` fweimer at redhat dot com
2021-12-13 15:02 ` fweimer at redhat dot com
2021-12-13 23:36 ` sam at gentoo dot org
2021-12-14  5:31 ` i at maskray dot me
2021-12-15 22:25 ` hjl.tools at gmail dot com
2022-01-05 13:32 ` hjl.tools at gmail dot com
2022-01-05 13:32 ` hjl.tools at gmail dot com
2022-01-21 19:43 ` cvs-commit at gcc dot gnu.org
2022-01-24 14:52 ` hjl.tools at gmail 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).