The patch that you sent appears to only mask the actual problem.
The idea behind that code is that we only dump portions of memory that
are writable, and not write out executable code which could have been
obtained from the executable instead, for example.
Would you be able to build gdb and then run gdb under gdb
(it takes a bit of getting used to, but it isn't that bad :-))?
I would be more interested in seeing exactly what it is about the core
file in question that causes gdb to generate that message. Once we
understand this, it should be pretty easy to figure out what is wrong
in binfmt_elf.c that causes you the problems.
-Eric
-- "The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."