[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/j
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo` |
Date: |
Sun, 10 Jan 2021 22:55:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27169
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13109
--> https://sourceware.org/bugzilla/attachment.cgi?id=13109&action=edit
A patch to generate R_386_PLT32
I tried this patch when I made:
commit bd7ab16b4537788ad53521c45469a1bdae84ad4a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Feb 13 07:34:22 2018 -0800
x86-64: Generate branch with PLT32 relocation
Since there is no need to prepare for PLT branch on x86-64, generate
R_X86_64_PLT32, instead of R_X86_64_PC32, if possible, which can be
used as a marker for 32-bit PC-relative branches.
To compile Linux kernel, this patch:
From: "H.J. Lu" <hjl.tools@gmail.com>
Subject: [PATCH] x86: Treat R_X86_64_PLT32 as R_X86_64_PC32
On i386, there are 2 types of PLTs, PIC and non-PIC. PIE and shared
objects must use PIC PLT. To use PIC PLT, you need to load
_GLOBAL_OFFSET_TABLE_ into EBX first. There is no need for that on
x86-64 since x86-64 uses PC-relative PLT.
and got
FAIL: visibility (hidden_normal) (non PIC)
FAIL: visibility (hidden_normal) (non PIC, load offset)
FAIL: visibility (hidden_normal) (PIC main, non PIC so)
FAIL: visibility (hidden_weak) (non PIC)
FAIL: visibility (hidden_weak) (non PIC, load offset)
FAIL: visibility (hidden_weak) (PIC main, non PIC so)
FAIL: visibility (protected) (non PIC)
FAIL: visibility (protected) (non PIC, load offset)
FAIL: visibility (protected) (PIC main, non PIC so)
FAIL: visibility (protected_undef_def) (non PIC)
FAIL: visibility (protected_undef_def) (non PIC, load offset)
FAIL: visibility (protected_undef_def) (PIC main, non PIC so)
FAIL: visibility (protected_weak) (non PIC)
FAIL: visibility (protected_weak) (non PIC, load offset)
FAIL: visibility (protected_weak) (PIC main, non PIC so)
FAIL: visibility (normal) (non PIC)
FAIL: visibility (normal) (non PIC, load offset)
FAIL: visibility (normal) (PIC main, non PIC so)
FAIL: ld-i386/pr19636-2a
FAIL: ld-i386/pr19636-2b
FAIL: ld-i386/pr19636-2c
FAIL: ld-i386/pr19636-2d
FAIL: ld-i386/pr19636-2e
FAIL: ld-i386/pr20515
FAIL: shared (non PIC)
FAIL: shared (non PIC, load offset)
FAIL: shared (PIC main, non PIC so)
in i386 linker tests.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/27169] New: i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/09
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/09
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`,
hjl.tools at gmail dot com <=
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/10
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/12
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/12
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, i at maskray dot me, 2021/01/12
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/13
- [Bug gas/27169] i386: Emit R_386_PLT32 instead of R_386_PC32 for `call/jmp foo`, hjl.tools at gmail dot com, 2021/01/13