/* Force some padding alignment. Use 4KiB to avoid conflict with Linker's *16KiBcompatloadinglogic,whichneedstoapply4KiBoffsets.
*/ int rw1 __attribute__((aligned(4096))) = RW1;
int bss0, bss1;
int* const prw0 = &rw0;
/* Ensure RELRO segment is large enough to have "middle pages" in 16KiB. *4096*8bytes=32KiB(on64-bit).
*/ int *const big_relro_table[4096] = {
&rw0, &bss0, &rw1, &bss1, &rw0,
&bss0, &rw1, &bss1 /* ... The compiler will automatically fill the remaining part with NULL,
but the preceding relocations are enough to enlarge RELRO. */
};
int loader_test_func(void) { // Must reference big_relro_table to ensure it is not removed by gc-sections. if (big_relro_table[0] == 0) return0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.