Commit Graph
4 Commits
Author SHA1 Message Date
Kees Cook 0c918e753f arm/build: Assert for unwanted sections
In preparation for warning on orphan sections, enforce
expected-to-be-zero-sized sections (since discarding them might hide
problems with them suddenly gaining unexpected entries).

Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Russell King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2020-09-01 10:03:18 +02:00
Kees Cook 512dd2eebe arm/build: Add missing sections
Add missing text stub sections .vfp11_veneer and .v4_bx, as well as
missing DWARF sections, when present in the build.

Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Cc: Russell King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2020-09-01 10:03:18 +02:00
Kees Cook 3b14aefb84 arm/build: Explicitly keep .ARM.attributes sections
In preparation for adding --orphan-handling=warn, explicitly keep the
.ARM.attributes section (at address 0[1]) by expanding the existing
ELF_DETAILS macro into ARM_DETAILS.

[1] https://reviews.llvm.org/D85867

Suggested-by: Nick Desaulniers <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Fangrui Song <[email protected]>
Cc: Russell King <[email protected]>
Link: https://lore.kernel.org/lkml/CAKwvOdk-racgq5pxsoGS6Vtifbtrk5fmkmnoLxrQMaOvV0nPWw@mail.gmail.com/
Link: https://lore.kernel.org/r/[email protected]
2020-09-01 10:03:18 +02:00
Kees Cook d7e3b065dc arm/build: Refactor linker script headers
In preparation for adding --orphan-handling=warn, refactor the linker
script header includes, and extract common macros.

Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Russell King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2020-09-01 10:03:17 +02:00