2012-08-01 James Lemke <jwlemke@codesourcery.com>
* gas/dwarf2dbg.c (out_set_addr): Allow for non-constant value of
DWARF2_LINE_MIN_INSN_LENGTH
* gas/config/tc-ppc.c (ppc_dwarf2_line_min_insn_length): Declare
and initialize.
(md_apply_fix): Branch addr can be a multiple of 2 or 4.
* gas/config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): Now a
variable reference.
gas/testsuite/ChangeLog:
2012-08-01 James Lemke <jwlemke@codesourcery.com>
* gas/cfi/cfi-ppc-1.d: Allow for code alignment of 2 or 4.
ld/ChangeLog:
2012-08-01 James Lemke <jwlemke@codesourcery.com>
* ld/testsuite/ld-gc/pr13683.d: XFAIL for powerpc*-*-eabivle.
+2012-08-01 James Lemke <jwlemke@codesourcery.com>
+
+ * gas/dwarf2dbg.c (out_set_addr): Allow for non-constant value of
+ DWARF2_LINE_MIN_INSN_LENGTH
+ * gas/config/tc-ppc.c (ppc_dwarf2_line_min_insn_length): Declare
+ and initialize.
+ (md_apply_fix): Branch addr can be a multiple of 2 or 4.
+ * gas/config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): Now a
+ variable reference.
+
2012-07-31 Maciej W. Rozycki <macro@codesourcery.com>
Chao-Ying Fu <fu@mips.com>
Catherine Moore <clm@codesourcery.com>
2012-07-31 Maciej W. Rozycki <macro@codesourcery.com>
Chao-Ying Fu <fu@mips.com>
Catherine Moore <clm@codesourcery.com>
/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
int ppc_cie_data_alignment;
/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
int ppc_cie_data_alignment;
+/* The dwarf2 minimum instruction length. */
+int ppc_dwarf2_line_min_insn_length;
+
/* More than this number of nops in an alignment op gets a branch
instead. */
unsigned long nop_limit = 4;
/* More than this number of nops in an alignment op gets a branch
instead. */
unsigned long nop_limit = 4;
ppc_set_cpu ();
ppc_cie_data_alignment = ppc_obj64 ? -8 : -4;
ppc_set_cpu ();
ppc_cie_data_alignment = ppc_obj64 ? -8 : -4;
+ ppc_dwarf2_line_min_insn_length = (ppc_cpu & PPC_OPCODE_VLE) ? 2 : 4;
#ifdef OBJ_ELF
/* Set the ELF flags if desired. */
#ifdef OBJ_ELF
/* Set the ELF flags if desired. */
insn = bfd_getb32 ((unsigned char *) where);
else
insn = bfd_getl32 ((unsigned char *) where);
insn = bfd_getb32 ((unsigned char *) where);
else
insn = bfd_getl32 ((unsigned char *) where);
- if ((value & 3) != 0)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("must branch to an address a multiple of 4"));
+ if (ppc_mach() == bfd_mach_ppc_vle)
+ {
+ if ((value & 1) != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch address must be a multiple of 2"));
+ }
+ else
+ {
+ if ((value & 3) != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch address must be a multiple of 4"));
+ }
if ((offsetT) value < -0x40000000
|| (offsetT) value >= 0x40000000)
as_bad_where (fixP->fx_file, fixP->fx_line,
if ((offsetT) value < -0x40000000
|| (offsetT) value >= 0x40000000)
as_bad_where (fixP->fx_file, fixP->fx_line,
extern int ppc_cie_data_alignment;
extern int ppc_cie_data_alignment;
-#define DWARF2_LINE_MIN_INSN_LENGTH 4
+extern int ppc_dwarf2_line_min_insn_length;
+
+#define DWARF2_LINE_MIN_INSN_LENGTH ppc_dwarf2_line_min_insn_length
#define DWARF2_DEFAULT_RETURN_COLUMN 0x41
#define DWARF2_CIE_DATA_ALIGNMENT ppc_cie_data_alignment
#define DWARF2_DEFAULT_RETURN_COLUMN 0x41
#define DWARF2_CIE_DATA_ALIGNMENT ppc_cie_data_alignment
emit_expr (&exp, sizeof_address);
}
emit_expr (&exp, sizeof_address);
}
-#if DWARF2_LINE_MIN_INSN_LENGTH > 1
static void scale_addr_delta (addressT *);
static void
scale_addr_delta (addressT *addr_delta)
{
static int printed_this = 0;
static void scale_addr_delta (addressT *);
static void
scale_addr_delta (addressT *addr_delta)
{
static int printed_this = 0;
- if (*addr_delta % DWARF2_LINE_MIN_INSN_LENGTH != 0)
+ if (DWARF2_LINE_MIN_INSN_LENGTH > 1)
- if (!printed_this)
- as_bad("unaligned opcodes detected in executable segment");
- printed_this = 1;
+ if (*addr_delta % DWARF2_LINE_MIN_INSN_LENGTH != 0 && !printed_this)
+ {
+ as_bad("unaligned opcodes detected in executable segment");
+ printed_this = 1;
+ }
+ *addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH;
- *addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH;
-#else
-#define scale_addr_delta(A)
-#endif
/* Encode a pair of line and address skips as efficiently as possible.
Note that the line skip is signed, whereas the address skip is unsigned.
/* Encode a pair of line and address skips as efficiently as possible.
Note that the line skip is signed, whereas the address skip is unsigned.
+2012-08-01 James Lemke <jwlemke@codesourcery.com>
+
+ * gas/cfi/cfi-ppc-1.d: Allow for code alignment of 2 or 4.
+
2012-07-31 Catherine Moore <clm@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
2012-07-31 Catherine Moore <clm@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
00000000 00000010 00000000 CIE
Version: 1
Augmentation: "zR"
00000000 00000010 00000000 CIE
Version: 1
Augmentation: "zR"
- Code alignment factor: 4
+ Code alignment factor: [24]
Data alignment factor: -4
Return address column: 65
Augmentation data: 1b
Data alignment factor: -4
Return address column: 65
Augmentation data: 1b
+2012-08-01 James Lemke <jwlemke@codesourcery.com>
+
+ * ld/testsuite/ld-gc/pr13683.d: XFAIL for powerpc*-*-eabivle.
+
2012-07-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14156
2012-07-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/14156
#source: dummy.s
#ld: --gc-sections -e main --defsym foo=foo2 tmpdir/pr13683.o
#nm: --format=bsd
#source: dummy.s
#ld: --gc-sections -e main --defsym foo=foo2 tmpdir/pr13683.o
#nm: --format=bsd
-#xfail: sh64*-*-* iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-*
+#xfail: sh64*-*-* iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle
# Note - look for both "foo" and "foo2" being defined, non-zero function symbols
# Note - look for both "foo" and "foo2" being defined, non-zero function symbols