On Fri, Jul 10, 2020 at 11:58:06AM +0100, Nick Clifton wrote:
Hi Guys,
I have just updated PR 26047 with a suggested patch which I think could resolve this situation. (Patch attached here as well in order to save time). It adds a new linker command line option: -z allowexec which will disable the warnings about linking in executable files. The default is still to have these warnings as I think that in most cases this behaviour makes sense.
Will this solve the problem for you ?
Hi Nick,
Thanks for looking at this.
I think the main issue is going to be the breaking of existing software builds. In particular, as distros pull in the new version of binutils, they'll run into errors building their current version of SeaBIOS. Even if we update SeaBIOS today, it will be some time before the distros will pull that change in. It'll also be a problem for those trying to build older versions of SeaBIOS on newer toolchains.
Unless I'm missing something, this will also be a problem for those building recent versions of the Linux kernel. It's build used this ability of ld up until a few months ago (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... ). Although the latest Linux has changed, building older versions is fairly common. It's unclear to me if there are other common packages that use this ability of ld.
Also, you mentioned "which will disable the warnings about linking in executable files". I thought PR 26047 created a fatal error in this situation. Is the proposed change to make the error a warning or am I missing something?
As for the particular workaround, "-z allowexec" generates a warning on current versions of ld. Given that, for SeaBIOS, my first reaction would probably be to change the SeaBIOS build to unconditionally clear the flag in the intermediate binary than to deploy a more complicated ld version check to set the given command-line flag. I'd like to give that some more thought though.
Thanks again, -Kevin