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

Alexandre Oliva aoliva@redhat.com
Wed Aug 23 03:19:00 GMT 2000


On Aug 23, 2000, "H . J . Lu" <hjl@lucon.org> wrote:

> This patch seems to work for me on ia32. Alexandre, I am afraid all
> those platforms where the original behavior is changed due to your
> patch are broken.

As I wrote in the original patch, I tested it minimally, and it
appeared to work, but I'd have appreciated if maintainers of each
affected port could double-check it.

> 	* write.c (TC_FIX_ADJUSTABLE): Remove the duplicate.

Wrong.  It's not a duplicate, it's a default.

> 	* config/tc-i386.h (TC_FIX_ADJUSTABLE): Restore it to the
> 	original behavior.

This might be the way to go short-term, but if tc_fix_adjustable()
says a reloc can be fixed up by the assembler, there should be no
reason why it shouldn't do it.  It is probably tc_fix_adjustable()
that needs tweaking.  Redefining TC_FIX_ADJUSTABLE to 0 is just
papering over the problem.


> -#if defined (OBJ_ELF) || defined (OBJ_COFF) || defined (TE_PE)
> +#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) || defined (OBJ_COFF)) && !defined (TE_PE)

The original #if in write.c was:

#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.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Binutils mailing list