This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Set xfail on empic for Linux/mips
MIPS empic fails because it expects relocs on
la $3,2f-l5 # R_MIPS_GNU_REL_HI16 .text 0
# R_MIPS_GNU_REL_LO16 .text D8
la $3,2f+8-l5 # R_MIPS_GNU_REL_HI16 .text 0
# R_MIPS_GNU_REL_LO16 .text E8
where both 2f and l5 are local labels. From reading through
comments in the mips code, I gather this is necessary to support
linker relaxations. No?
If so, then mips needs to define TC_FORCE_RELOCATION_SUB_SAME,
TC_FORCE_RELOCATION_SUB_LOCAL and TC_VALIDATE_FIX_SUB. Something
like
#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEG) \
(mips_pic == EMBEDDED_PIC || !SEG_NORMAL (SEG))
#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX) \
(mips_pic == EMBEDDED_PIC || S_FORCE_RELOC ((FIX)->fx_subsy))
#define TC_VALIDATE_FIX_SUB(FIX) \
(mips_pic == EMBEDDED_PIC)
Adding the above to tc-mips.h results in just the following two
failures:
FAIL: MIPS branch-misc-2
FAIL: MIPS empic3 (external)
--
Alan Modra
IBM OzLabs - Linux Technology Centre