[PATCH] TILE gas fixes for relocations with aliases.
Walter Lee
walt@tilera.com
Fri Oct 28 07:51:00 GMT 2011
More information about the Binutils mailing list
Fri Oct 28 07:51:00 GMT 2011
- Previous message (by thread): [PATCH] Add TILEPro and TILE-Gx port maintainer.
- Next message (by thread): PATCH COMMITTED: Fix readelf --debug=frames-interp with DW_CFA_restore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Sorry I sent this earlier with the wrong subject.] This patch fixes the TILE-Gx/TILEPro port of gas to deal with relocations of aliases, and is needed to compile glibc and the latest gcc. OK to commit? Since I'm the maintainers for these ports can I commit without approval ahead of time? gas/ChangeLog 2011-10-28 Walter Lee <walt@tilera.com> * config/tc-tilegx.c (emit_tilegx_instruction) Handle relocations of aliases. * config/tc-tilepro.c: (emit_tilepro_instruction) Likewise. Index: gas/config/tc-tilegx.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-tilegx.c,v retrieving revision 1.1 diff -u -p -r1.1 tc-tilegx.c --- gas/config/tc-tilegx.c 13 Jun 2011 15:18:48 -0000 1.1 +++ gas/config/tc-tilegx.c 28 Oct 2011 06:30:50 -0000 @@ -691,15 +691,19 @@ emit_tilegx_instruction (tilegx_bundle_b if (operand_exp->X_add_symbol->sy_value.X_md) { - if (require_symbol) - { - as_bad (_("Operator may only be applied to symbols.")); - } - /* HACK: We used X_md to mark this symbol as a fake wrapper around a real expression. To unwrap it, we just grab its value here. */ operand_exp = &operand_exp->X_add_symbol->sy_value; + + if (require_symbol) + { + /* Look at the expression, and reject it if it's not a + plain symbol. */ + if (operand_exp->X_op != O_symbol + || operand_exp->X_add_number != 0) + as_bad (_("Operator may only be applied to symbols.")); + } } else { Index: gas/config/tc-tilepro.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-tilepro.c,v retrieving revision 1.1 diff -u -p -r1.1 tc-tilepro.c --- gas/config/tc-tilepro.c 13 Jun 2011 15:18:48 -0000 1.1 +++ gas/config/tc-tilepro.c 28 Oct 2011 06:30:50 -0000 @@ -560,15 +560,19 @@ emit_tilepro_instruction (tilepro_bundle if (operand_exp->X_add_symbol->sy_value.X_md) { - if (require_symbol) - { - as_bad (_("Operator may only be applied to symbols.")); - } - /* HACK: We used X_md to mark this symbol as a fake wrapper around a real expression. To unwrap it, we just grab its value here. */ operand_exp = &operand_exp->X_add_symbol->sy_value; + + if (require_symbol) + { + /* Look at the expression, and reject it if it's not a + plain symbol. */ + if (operand_exp->X_op != O_symbol + || operand_exp->X_add_number != 0) + as_bad (_("Operator may only be applied to symbols.")); + } } else {
- Previous message (by thread): [PATCH] Add TILEPro and TILE-Gx port maintainer.
- Next message (by thread): PATCH COMMITTED: Fix readelf --debug=frames-interp with DW_CFA_restore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list