mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
tests: When building .so from -O asm output mark as non-executable stack
For certain tests, we take the output from dtc -O asm and build it into a .so shared library which we then dlopen() for further tests. Because we don't mark it otherwise, it's treated as requiring an executable stack, which dlopen() refuses to open as of glibc-2.41. Of course, the library is pure data, no code, so it certainly doesn't need an executable stack. Add the -znoexecstack linker option to avoid the error. Fixes: https://github.com/dgibson/dtc/issues/163 Reported-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: David Gibson <david@gibson.dropbear.id.a>
This commit is contained in:
parent
915daadbb6
commit
ce1d858888
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ run_dtc_test () {
|
|||
}
|
||||
|
||||
asm_to_so () {
|
||||
$CC -shared -o $1.test.so "$SRCDIR/data.S" $1.test.s
|
||||
$CC -shared -Wl,-znoexecstack -o $1.test.so "$SRCDIR/data.S" $1.test.s
|
||||
}
|
||||
|
||||
asm_to_so_test () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue