This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker script data statements


On Thu, Feb 19, 2004 at 11:51:00AM +0000, Nathan Sidwell wrote:
>   	    value = exp_fold_tree (s->data_statement.exp,
>   				   abs_output_section,
>   				   lang_final_phase_enum, dot, &dot);
> ! 	    s->data_statement.value
> ! 	      = value.value + value.section->bfd_section->vma;
>   	    if (!value.valid_p)
>   	      einfo (_("%F%P: invalid data statement\n"));
>   	  }

When !value.valid_p, it's not safe to dereference value.section.  Your
patch is OK if you change the above to

	    if (!value.valid_p)
	      einfo (_("%F%P: invalid data statement\n"));
	    s->data_statement.value
	      = value.value + value.section->bfd_section->vma;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]