https://sourceware.org/bugzilla/show_bug.cgi?id=30143
Nick Clifton <nickc at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nickc at redhat dot com --- Comment #1 from Nick Clifton <nickc at redhat dot com> --- Hi Pali, OK, so I am assuming that the desired behaviour is specific to the NT kernel. Ie, the default of allowing all sections to be paged is correct for most PE binaries, just not the kernel ? Given that, there needs to be some way to distinguish between building a kernel and building a normal binary and the most obvious way is to have a custom linker script for the kernel. This script can set the IMAGE_SCN_MEM_NOT_PAGED flag for all sections except one called "PAGE". Do you agree ? So what we need is a way to set PE specific section flags in linker scripts. (Which goes against what I said for PR 30145, but I am going through these PRs in reverse order and I now see that there is a genuine need to extend the linker script syntax). The linker currently supports setting a section's type via the "TYPE=xxx" syntax, but that is not quite what we need, since presumably there might be a need to set more than one flag. So I guess that we need to add a "FLAG=xxx[|xxx]+" syntax. Then, since the flags are going to be file format/architecture specific, we need to implement a callback into the linker's emulation framework in order to parse the flags, and another one to set them. Plus we need to add support for the NOT_PAGED flag to the BFD library (since it currently does not support it at all). *sigh* I was right about this being a big potential source for new bugs. It would be a lot easier to just use objcopy to set the flag after the the link has completed... Any thoughts ? Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.