+2019-01-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/88954
+ * config/i386/i386.c (ix86_force_load_from_GOT_p): Also check
+ noplt attribute.
+
2019-01-22 Richard Earnshaw <rearnsha@arm.com>
PR target/88469
{
return ((TARGET_64BIT || HAVE_AS_IX86_GOT32X)
&& !TARGET_PECOFF && !TARGET_MACHO
- && !flag_plt && !flag_pic
+ && !flag_pic
&& ix86_cmodel != CM_LARGE
&& GET_CODE (x) == SYMBOL_REF
&& SYMBOL_REF_FUNCTION_P (x)
+ && (!flag_plt
+ || (SYMBOL_REF_DECL (x)
+ && lookup_attribute ("noplt",
+ DECL_ATTRIBUTES (SYMBOL_REF_DECL (x)))))
&& !SYMBOL_REF_LOCAL_P (x));
}
+2019-01-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/88954
+ * gcc.target/i386/pr88954-1.c: New test.
+ * gcc.target/i386/pr88954-2.c: Likewise.
+
2019-01-22 Richard Earnshaw <rearnsha@arm.com>
PR target/88469
--- /dev/null
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -fplt" } */
+
+extern void bar (void) __attribute__((noplt));
+
+void *
+foo (void)
+{
+ return &bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "\(mov|lea\)\(l|q\)\[ \t\]*\(\\\$|\)bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "\(mov|lea\)l\[ \t\]*\(\\\$|\)bar," { target { ia32 && got32x_reloc } } } } */
--- /dev/null
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fno-pic -fplt" } */
+
+extern void bar (void) __attribute__((noplt));
+extern void *p;
+
+void
+foo (void)
+{
+ p = &bar;
+}
+
+/* { dg-final { scan-assembler "mov\(l|q\)\[ \t\]*bar@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "movl\[ \t\]*bar@GOT," { target { ia32 && got32x_reloc } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "mov\(l|q\)\[ \t\]*\\\$bar," { target { ia32 && got32x_reloc } } } } */