This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Another relocation problem - and patch
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> writes:
|> After patch:
|>
|> $ as
|> jmp a+b
|> a:
|> b=2
|> $ objdump --disassemble
|>
|> a.out: file format elf32-i386
|>
|> Disassembly of section .text:
|>
|> 00000000 <a-0x5>:
|> 0: e9 02 00 00 00 jmp 7 <a+0x2>
|> $
|>
|>
|> It doesn't use optimal length but at least it doesn't create broken code.
|> The relax is actually done in md_estimate_size_before_relax because the
|> section of expression symbol is different. Has anybody idea what to do
|> with it? Is there some function that evaluates the expression symbol and
|> converts it to symbol + constant value?
I think the assembler should just create a fixup for this expression.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5