Hi, My recent attempt at submitting the GCC patch series to add FDPIC support for arm triggered a discussion about -static-pie support [1], which continued on IRC.
The patch currently supports -static but the resulting binary still needs the dynamic linker to prepare the parameters for __self_reloc, and there are arguments that a static binary should not have a PT_INTERP field. At present, musl supports -static-pie for sh+FDPIC only. I think other uclibc-ng targets with FDPIC (frv, bfin) do not support -static, but I'm not sure how to build such toolchains, nor if they are still supported. It seems I have several options: (a) add support for static-pie to uclibc-ng. This means creating a new rcrt1.o or similar, which would embed parts of the dynamic linker into static-pie executables. I'm not sure how big a task this is? (b) add support for FDPIC on arm to musl, which I'm not familiar with (c) declare -static not supported on arm-FDPIC (d) gather consensus that -static with pt_interp is ok (my preference, since that's what the current patches do :-) So, my questions are: - does uclibc-ng support -static on some FDPIC targets? which ones? - how much work would option (a) mean? - are uclibc-ng people opposed to option (d)? Thanks, Christophe [1] https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00820.html _______________________________________________ devel mailing list devel@uclibc-ng.org https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel