krytarowski added a comment. What do you think about this new logic:
1. specified `-z execstack` -> do not emit GNU STACK segment 2. specified `-z noexecstack` -> emit GNU STACK segment 3. no option specified -> detect `findSection(".note.GNU-stack")` (I might miss offhand some details here to be sure if it is reliable) 3.1. detected -> emit GNU STACK segment 3.2. not detected -> do not emit GNU STACK segment Additionally we will specify explicitly in the clang driver for Linux and FreeBSD `-z noexecstack`. If this is not acceptable and we must use GNU extensions for everybody, we will need to specify this ugly `-z noexecstack` in the NetBSD driver (once we will get an agreement that we customize the linker through the driver). Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56554/new/ https://reviews.llvm.org/D56554 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits