When I passed the “-zcommon-page-size=2097152” and “-zmax-page-size=2097152” options to the linker, the program I got didn’t work.
There is my build command.
clang -fuse-ld=lld -Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -o test test.c ./test
“error while loading shared libraries: cannot apply additional memory protection after relocation: Cannot allocate memory.”
I don’t know why there’s such a problem. Any reply is appreciated!
There is a simple example reproduction:
Thanks a lot.