From 2f992c04c2d58b2bf5b048abc15cea1d3c4459f2 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 15 Jul 1999 01:33:07 +0000 Subject: [PATCH] Apply patch from Philip Blundell Prepend LOCAL_LABEL_PREFIX (if defined) to local symbols. ARM: Set F_SOFTFLOAT in the output file if -mno-fpu was given. --- gas/ChangeLog | 12 ++++++++++++ gas/config/tc-arm.c | 37 ++++--------------------------------- gas/config/tc-arm.h | 3 +++ 3 files changed, 19 insertions(+), 33 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index a30a084f98..23feb61fc0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,15 @@ +1999-07-14 Philip Blundell + + * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it + is defined. + * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF. + + * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file + if -mno-fpu was given. + (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC + relocs. + (cons_fix_new_arm): Remove misleading comments. + 1999-07-14 Ian Lance Taylor * write.c (cvt_frag_to_fill): Use frag file and line in rs_org diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 93c6d82d23..7a90601a5c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -5036,6 +5036,7 @@ md_begin () if (support_interwork) flags |= F_INTERWORK; if (uses_apcs_float) flags |= F_APCS_FLOAT; if (pic_code) flags |= F_PIC; + if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT; bfd_set_private_flags (stdoutput, flags); } @@ -5923,17 +5924,11 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_LITERAL: case BFD_RELOC_ARM_HWLITERAL: /* If this is called then the a literal has been referenced across - a section boundry - possibly due to an implicit dump */ + a section boundary - possibly due to an implicit dump */ as_bad_where (fixp->fx_file, fixp->fx_line, - _("Literal referenced across section boundry (Implicit dump?)")); + _("Literal referenced across section boundary (Implicit dump?)")); return NULL; - case BFD_RELOC_ARM_GOTPC: - assert (fixp->fx_pcrel != 0); - code = fixp->fx_r_type; - code = BFD_RELOC_32_PCREL; - break; - #ifdef OBJ_ELF case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: @@ -6755,24 +6750,7 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) } -/* - * This fix_new is called by cons via TC_CONS_FIX_NEW - * - * We check the expression to see if it is of the form - * __GLOBAL_OFFSET_TABLE + ??? - * If it is then this is a PC relative reference to the GOT. - * i.e. - * ldr sl, L1 - * add sl, pc, sl - * L2: - * ... - * L1: - * .word __GLOBAL_OFFSET_TABLE + (. - (L2 + 4)) - * - * In this case use a reloc type BFD_RELOC_ARM_GOTPC instead of the - * normal BFD_RELOC_{16,32,64} - */ - +/* This fix_new is called by cons via TC_CONS_FIX_NEW. */ void cons_fix_new_arm (frag, where, size, exp) fragS * frag; @@ -6801,13 +6779,6 @@ cons_fix_new_arm (frag, where, size, exp) break; } - /* Look for possible GOTPC reloc */ - - /* - * Look for pic assembler and 'undef symbol + expr symbol' expression - * and a 32 bit size. - */ - fix_new_exp (frag, where, (int) size, exp, pcrel, type); } diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 72a5713e07..d27d61dd8f 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -171,6 +171,9 @@ char * arm_canonicalize_symbol_name PARAMS ((char *)); #define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L')) #define LOCAL_LABELS_FB 1 +#ifdef OBJ_ELF +#define LOCAL_LABEL_PREFIX '.' +#endif /* This expression evaluates to false if the relocation is for a local object for which we still want to do the relocation at runtime. True if we -- 2.34.1