[PATCH] Fix ld segfault with -Map -Tdata=xxx (arm-none-symbianelf, and maybe other targets)

Julian Brown julian@codesourcery.com
Thu May 5 19:05:00 GMT 2005


Hi,

This patch fixes a segfault when -Map is used together with -Tdata=xxx 
with ld on arm-none-symbianelf. The crash doesn't occur when -Tdata 
isn't used.

The problem occurs when writing the map file; the call to 
ldexp.c:exp_fold_tree in ldlang.c:print_assignment returns 
result.section==0 and result.valid_p==true in the breaking case. The 
patch just stops the crashing code from being executed.

Tested with targets=all on i686-pc-linux-gnu.

OK to apply, or is something more deeply broken here?

Julian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-1
URL: <https://sourceware.org/pipermail/binutils/attachments/20050505/a9717abe/attachment.ksh>


More information about the Binutils mailing list