https://sourceware.org/bugzilla/show_bug.cgi?id=28254
--- Comment #10 from Dietmar May <dcmay at copper dot net> --- >> Consider a stub of code that is intended to be copied somewhere else before >> it is executed That seems like the exception, rather than the rule. In that situation, the section can be explicitly marked as non-executable data. How often that will be the case? 0.000001%? Or is this some widely used paradigm? I was porting some code from another assembler and linker to gas / ld. Have used gcc extensively, first time using gas w/ld. Multi-cores, each core booting from a different memory location. ".init" won't work, neither will ".text" - would need ".init0", ".init1", etc. Code compiles with gas, links with ld, no errors, no warnings. Debugs fine with gdb. Works great! Upgrade gas. Code compiles, links, no errors, no warnings. But won't debug properly with gdb. Looks like a bug, but no, turns out it's a feature. OK, I can understand safety first. We have to protect experienced users doing advanced things like self-relocating code from accidentally opening a security hole. But please consider at least adding a warning to say, You've got executable code, but you didn't mark it as executable, so we're making it data, not code - even though we've compiled it for you. And if necessary, that warning can be suppressed by someone who is writing relocating code, but doesn't want to bother to mark the section as "d" or "r". -- You are receiving this mail because: You are on the CC list for the bug.