irel = *rel;
/* Only allow relocations against absolute symbol, which can be
- resolved as absolute value + addend. GOTPCREL relocations
- are allowed since absolute value + addend is stored in the
- GOT slot. */
+ resolved as absolute value + addend. GOTPCREL and GOT32
+ relocations are allowed since absolute value + addend is
+ stored in the GOT slot. */
if (bed->target_id == X86_64_ELF_DATA)
{
r_type &= ~R_X86_64_converted_reloc_bit;
else
valid_p = (r_type == R_386_32
|| r_type == R_386_16
- || r_type == R_386_8);
+ || r_type == R_386_8
+ || r_type == R_386_GOT32
+ || r_type == R_386_GOT32X);
if (valid_p)
*no_dynreloc_p = true;
run_dump_test "pr27491-4"
run_dump_test "dt-relr-1a"
run_dump_test "dt-relr-1b"
+run_dump_test "pr28870"
if { !([istarget "i?86-*-linux*"]
|| [istarget "i?86-*-gnu*"]
--- /dev/null
+#as: --32
+#ld: --no-dynamic-linker -m elf_i386 -pie
+#readelf: -s --wide
+
+#...
+Symbol table '.symtab' contains [0-9]+ entries:
+ Num: Value Size Type Bind Vis Ndx Name
+#...
+ +[a-f0-9]+: 00000002 0 NOTYPE LOCAL DEFAULT ABS foo
+#pass