elf relocation on arm
Moderator: RoccoMarco
Re: elf relocation on arm
ok.
does this mean that all addresses will end with bit zero set to one?
if so. how come gcc produces a blx 0x20010184 instruction?
im using the same flags as chibios makefile.
matias
does this mean that all addresses will end with bit zero set to one?
if so. how come gcc produces a blx 0x20010184 instruction?
im using the same flags as chibios makefile.
matias
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: elf relocation on arm
well both.
listing shows the address as a offset. while debugger shows it as absolute.
m
listing shows the address as a offset. while debugger shows it as absolute.
m
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: elf relocation on arm
The program counter bit zero must always contain 1, I would assume there is an error in compiler options or in the assembler sources, you need to use the .thumb directive in assembler files.
Giovanni
Giovanni
Re: elf relocation on arm
ok.
but this instuction comes from c code. so theres no hand crafted assembly
looks like this
this results in blx instruction
i should mention that test() is not defined. but is intended to be linked at runtime
thus a entry in the plt
but this instuction comes from c code. so theres no hand crafted assembly
looks like this
Code: Select all
int main ()
{
test ();
}
this results in blx instruction
i should mention that test() is not defined. but is intended to be linked at runtime
thus a entry in the plt
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: elf relocation on arm
So, it is the linker that has to put an odd address there or I am missing something?
Giovanni
Giovanni
Re: elf relocation on arm
i doubt there is anything wrong with the linker for such a simple example.
but perhaps i must align .got section in the linker file to a uneven offset?
m
but perhaps i must align .got section in the linker file to a uneven offset?
m
Re: elf relocation on arm
perhaps tyere is a linker bug here. blx (address) is not supported on m4
it must be blx rm
it must be blx rm
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: elf relocation on arm
I think "blx" only accepts a register as parameter or it would be "bl" which is limited to near addresses.
Giovanni
Giovanni