PATCH: ld/2462: -Wl,-s always output unused bytes at the end

Daniel Jacobowitz drow@false.org
Fri Mar 17 15:07:00 GMT 2006


On Fri, Mar 17, 2006 at 06:32:22AM -0800, H. J. Lu wrote:
> Before your patch, _bfd_elf_link_output_relocs was called only for
> relocatable files or finfo->info->emitrelocations is true. Now it
> called on all ELF targets for all cases.

I had to spend twenty minutes going over your patch and the current and
previous code in order to find where this happened.  If you'd just said
something like "because of how emit_relocs is set in
bfd_elf_final_link", maybe folks would have been able to understand
what you were doing.

That means the patch is, by definition, not obvious.

After much mucking around, I think that just fixing the assignment to
emit_relocs (by removing the check for elf_backend_emit_relocs) will
work correctly.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list