configure.ac: for linuxkm with PIE, don't include enable-fpcc in enable-all-crypto (the compiler generates a weird out-of-bounds bss reference for find_hole());

linuxkm/Makefile: in recipe (awk script) for wc_linuxkm_pie_reloc_tab.c, report and error on unexpected relocation types;

linuxkm/module_hooks.c: in wc_linuxkm_normalize_relocations():
* fix bounds checking on the input,
* recognize references pointing at the first byte after the end of the segment,
* and mask out pad bytes when rendering the 32 bit addresses;

linuxkm/wolfcrypt.lds: add 4k alignment directives just before the segment end fenceposts, to make the fenceposts more inclusive.
This commit is contained in:
Daniel Pouzzner
2025-08-23 17:21:24 -05:00
parent 6f567bbca2
commit a67d1a84f5
4 changed files with 46 additions and 21 deletions
+4
View File
@@ -3,24 +3,28 @@ SECTIONS {
.text.wolfcrypt : {
__wc_text_start = .;
*(.text.wolfcrypt)
. = ALIGN(4096);
__wc_text_end = .;
}
. = ALIGN(4096);
.rodata.wolfcrypt : {
__wc_rodata_start = .;
*(.rodata.wolfcrypt)
. = ALIGN(4096);
__wc_rodata_end = .;
}
. = ALIGN(4096);
.data.wolfcrypt : {
__wc_rwdata_start = .;
*(.data.wolfcrypt)
. = ALIGN(4096);
__wc_rwdata_end = .;
}
. = ALIGN(4096);
.bss.wolfcrypt : {
__wc_bss_start = .;
*(.bss.wolfcrypt)
. = ALIGN(4096);
__wc_bss_end = .;
}
. = ALIGN(4096);