[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Alan Modra changed: What|Removed |Added CC||amodra at gmail dot com --- Comment #1 from Alan Modra --- If you specify -z max-page-size=0x20 then there is an expectation that the binary produced will work with an actual hardware page size of 0x20. If ld were instead to use minpagesize then the binary may not even run when the hardware page size is 0x20, and certainly won't have the page protection you expect with -z separate-code. I don't see any way around this. As ld.text says of -z separate-code: "Create separate code @code{PT_LOAD} segment header in the object. This specifies a memory segment that should contain only instructions and must be in wholly disjoint pages from any other data." The presumption here is that data can't appear in the text memory pages. So you can't use tricks like that done between rodata and data by DATA_SEGMENT_ALIGN (ie. starting rw data at the end of ro data but on the next page in order to save disk), because that allows part of rw data to leak into ro data and vice versa. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 --- Comment #2 from H.J. Lu --- On targets where the maximum page size is optional and only the minimum page size is required, we can set p_align to the minimum page size if the segment is less than the maximum page size. At run-time, these segments can be aligned at the maximum page size, but their p_align is the minimum page size. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment #3 from Fangrui Song --- Two R-- PT_LOAD segments are wasteful. Is it possible to move .rodata .eh_frame .eh_frame_hdr etc before the R-E PT_LOAD? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Sam James changed: What|Removed |Added CC||sam at gentoo dot org -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Sam James changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=30612 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Sam James changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=30907 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Sam James changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=26925 -- You are receiving this mail because: You are on the CC list for the bug.