This is the mail archive of the binutils@sourceware.cygnus.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]

Re: A very "strange" bug in gcc 2.96


On Sun, 21 May 2000, H . J . Lu wrote:

> > For x86, gas/config/tc-i386.c:md_estimate_size_before_relax needs to be
> > taught how to handle this case properly.  (I think that's all that's
> > needed...)
> 
> That is only ia32. What about others?

If what I understand about this problem is correct, then it's caused by a
feature in the x86 assembler, namely that jumps are emitted using the
smallest possible opcode that the assembler "knows" it can use.  If jumps
aren't treated specially on other gas architectures then there shouldn't
be a problem.

x86 gas currently assumes that if a jump target is within the same
segment, then it is OK to consider using a small jump, and that a reloc
isn't needed.  That assumption breaks badly now that gcc might be emitting
jumps to weak symbols.

-- 
Linuxcare.  Support for the Revolution.


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