+2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in
+ PDE.
+
2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
* elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
else if (bfd_link_dll (info))
info->callbacks->einfo
(_("%P: warning: creating DT_TEXTREL in a shared object\n"));
+ else if (bfd_link_pde (info))
+ info->callbacks->einfo
+ (_("%P: warning: creating DT_TEXTREL in a PDE\n"));
else
info->callbacks->einfo
(_("%P: warning: creating DT_TEXTREL in a PIE\n"));
+2021-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/ld-x86-64/textrel-1.err: New file.
+ * testsuite/ld-x86-64/textrel-1a.s: Likewise.
+ * testsuite/ld-x86-64/textrel-1b.s: Likewise.
+ * testsuite/ld-x86-64/x86-64.exp: Run textrel-1 tests.
+
2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-elf/property-and-1.d: Skip am33_2.0, hppa-hpux
--- /dev/null
+#...
+.*textrel-1b.o: warning: relocation against `foo' in read-only section `.rodata'
+.*: warning: creating DT_TEXTREL in a PDE
+#...
--- /dev/null
+ .text
+ .globl foo
+ .data
+ .align 4
+ .type foo, @object
+ .size foo, 4
+foo:
+ .long 4
+ .section .note.GNU-stack,"",@progbits
--- /dev/null
+ .text
+ .p2align 4
+ .globl _start
+ .type _start, @function
+_start:
+ ret
+ .size _start, .-_start
+ .globl ptr
+ .section .rodata
+ .align 8
+ .type ptr, @object
+ .size ptr, 8
+ptr:
+ .quad foo
+ .section .note.GNU-stack,"",@progbits
"" ""
{ pr27590a.obj.bz2 pr27590b.obj.bz2 }
{{readelf -SW pr27590.rd}} "pr27590.o"}
+ {"Build textrel-1.so" "-melf_x86_64 -shared" ""
+ "--64" { textrel-1a.s } {} "textrel-1.so"}
+ {"Build textrel-1" "-no-pie -melf_x86_64 -z nocopyreloc"
+ "tmpdir/textrel-1.so"
+ "--64" { textrel-1b.s } {{ld "textrel-1.err"}} "textrel-1"}
}
run_ld_link_tests $x86_64tests