[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/27127] New: [mips] relocation type R_MIPS_GOT_HI16 conflic
From: |
dongjianqiang2 at huawei dot com |
Subject: |
[Bug binutils/27127] New: [mips] relocation type R_MIPS_GOT_HI16 conflict with local symbol |
Date: |
Tue, 29 Dec 2020 02:08:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27127
Bug ID: 27127
Summary: [mips] relocation type R_MIPS_GOT_HI16 conflict with
local symbol
Product: binutils
Version: 2.34
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: dongjianqiang2 at huawei dot com
Target Milestone: ---
Created attachment 13084
--> https://sourceware.org/bugzilla/attachment.cgi?id=13084&action=edit
testcase
option: mips-linux-gnu-gcc generate-global.c -fPIE -pie -mxgot
global local addition .got
R_MIPS_GOT_HI16 R_MIPS_GOT16 got_index = 0xb6f64 0xA7A47F8
64KB*64KB 64KB
relocation item target value
0027a37c 016a9f16 R_MIPS_GOT_HI16 0027a1c0 global_symbol 0x3690000
0027e3e4 00000309 R_MIPS_GOT16 00000000 .text 0x368E114
both mips_got_entry = 0x3690000
but the gp = 0xA6ED894 (0xA6E5895 ~ 0xA6F5894)
Relocation item 0027a37c is a global_symbol,so linker creates mips_got_entry =
0x3690000 with got_index = 0xb6f64, which is equal to target value. Obviously
it,s valid for relocation type R_MIPS_GOT_HI16.
However, when linker relocate item 0027e3e4 with target value 0x368E114, bug
occur.
relocation truncated to fit: R_MIPS_GOT16 against `.text'
the symbol(0027e3e4) was local,the GOT16 relocation should load the equivalent
of %hi(VALUE)
value = mips_elf_high (value) << 16,
linker calculate mips_got_entry = 0x3690000, which is the same as the former
but invalid.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/27127] New: [mips] relocation type R_MIPS_GOT_HI16 conflict with local symbol,
dongjianqiang2 at huawei dot com <=