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: mn10300: relaxing vs section merging


> I don't recall the exact details, but what I recall had to do with
> losing information that was essential for (some definition of) correct
> relaxation.
> I do remember having run into this one problem years ago.  I probably
> thought the same anchoring issue could very well show up in other
> relocation types, and just disabled adjusting for them all.  Perhaps
> it's safe to enable adjusting, at least as long as the addend is zero.
> 
> > You have to use section-relative relocs with section merging
> 
> Why?

Because _bfd_elf_rela_local_sym() only adjusts STT_SECTION symbols.
If you have other types of symbols, it doesn't seem to adjust the
values properly.

> Anyhow...  I don't see how this could actually work in the general
> case, since mn10300_fix_adjustable() actually refuses to adjust
> relocations that reference symbols in code sections.

The case that's failing is thusly, where the symbol referenced is in
the merged rodata section and gets moved too far away through merging:

	.text
	mov	.L1,d1

	.section	.rodata.str1.1,"aMS",@progbits,1
.L1:
	.string	"\n"


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