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]

Re: Changes to gas/write.c and others break the ia32 assembler


On Wed, Aug 23, 2000 at 01:47:51PM -0300, Alexandre Oliva wrote:
> 
> > As I said, please restore the original behavior.
> 
> Go ahead and make it 0, if you will.  But I still think it would be
> papering over a problem elsewhere.  If the problem is on COFF only,
> let's make it 0 for COFF only.

ELF is broken. I don't use COFF as my native assembler.

> 
> >> #if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
> 
> >> so I indeed goofed in TE_PE (I missed the closing paren).  But
> >> OBJ_MAYBE_ELF was not there for sure.
> 
> > As I said, OBJ_MAYBE_ELF is needed for multi-format assembler.
> 
> How did it work without it, in write.c?

Because write.c includes config/obj-elf.h, which defines OBJ_ELF,
after config/tc-i386.h. OBJ_MAYBE_ELF may be defined in config.h,
which is a generated file.

> 
> > You may also need to check OBJ_MAYBE_COFF. Alan has warned the
> > danger of touching relocation code in assembler. He knows what he
> > was talking about.
> 
> So do I.  I know it's tricky.  I'd just rather fix the problem rather
> than hide it until the next person decides to clean things up and
> stumbles across the same maze of twisting passages all alike :-)

Call me dumb. I can't see how turning 

#if xxxx
.....
#endif

into

if (foo (x))
  {
    .....
  }

can have the same effect if foo (x) doesn't return a constant.


H.J.

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