On 11/08/2009 04:38 AM, Sam Ravnborg wrote: > I think ld discards zero size sections. No need to keep them around > if they are empty. > > Following patch should fix it up in a better way. > I reused most of Hannes changelog. Part of me wonders if this isn't better handled by just making relocs.c deal with _end as a special case (and of course making it possible to add others.) Here is a distinctively non-minimal patch -- I used a modified version of relocs.c for the Syslinux project, and this is basically a backport of the changes I did for that. It uses a regex to match either known-absolute or known-relative symbols; the remaining changes are mostly just dealing with particularly stupid code like using printf() to do the work of fwrite(), and using select() where appropriate. Sam, Ingo: I'd appreciate your opinions before checking anything in on this. -hpa