[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/13783] New: Generate static relocation for ldr pc, var
From: |
vova7890 at mail dot ru |
Subject: |
[Bug gas/13783] New: Generate static relocation for ldr pc, var |
Date: |
Wed, 29 Feb 2012 15:22:51 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13783
Bug #: 13783
Summary: Generate static relocation for ldr pc, var
Product: binutils
Version: 2.22
Status: NEW
Severity: critical
Priority: P2
Component: gas
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
Hello. I do not know how to fix the problem, so I will describe the situation
and its possible solution.
Have a static code:
.section FSWI_PATCH1, "ax", %progbits
.arm
ldr pc, main_jumper
.section FSWI_PATCH2,"ax",%progbits
.arm
main_jumper:
.int swi_handler @ function
FSWI_PATCH1 and FSWI_PATCH2 have static addresses. But I can`t compile it,
give "internal_relocation (type: OFFSET_IMM) not fixed up". IAR compile it
fine. I try to find bug in GAS and found this:
tc-arm.c: 21867:
case BFD_RELOC_ARM_OFFSET_IMM:
if (section->use_rela_p)
{
code = fixp->fx_r_type;
break;
}
I make it like that:
if (section->use_rela_p)
{
code = fixp->fx_r_type;
break;
} else {
code = BFD_RELOC_ARM_LDR_PC_G0;
break;
}
And it correctly compile and generate 4 bytes of opcode like IAR. I do not
know how to correctly fix this error, but the nature of the error, I think you
understand.
Sorry for my english :)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gas/13783] New: Generate static relocation for ldr pc, var,
vova7890 at mail dot ru <=