On 11/26, Masami Hiramatsu wrote:
$ grep -r DUMP_WRITE arch/*/include
arch/ia64/include/asm/elf.h: DUMP_WRITE(&phdr, sizeof(phdr)); \
arch/ia64/include/asm/elf.h: DUMP_WRITE((void *) gate_phdrs[\
arch/um/sys-i386/asm/elf.h uses DUMP_WRITE() too.
Oops, certainly, that's a problem.
IMHO, we should not do like that, all parameter required by a macro should be
specified explicitly, since it reduces readability so much...
I think we'd better make those macros inline function, check it's return value
for error handling.
Agreed, DUMP_WRITE() in its current form should die. Not only
it has implicit parameter, it does "goto" from the macro body
and it has multiple definitions withing the same file.
But perhaps this needs a separate patch? It is not trivial to kill
DUMP_WRITE(), you can fix this patch if you change DUMP_WRITE()
to use cprm->file instead of file.