[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG elf32-i386 R_386_PC32 done wrong
From: |
Eric Botcazou |
Subject: |
Re: BUG elf32-i386 R_386_PC32 done wrong |
Date: |
Sat, 24 Jun 2006 08:56:09 +0200 |
User-agent: |
KMail/1.7.1 |
> Knowledge of how microprocessors work (re adding the offset to
> eip) goes back the beginning of the very first microprocessors
> of any kind. This is why it is amazing that *both* compiler
> writers and linker writers in linux seem to be completely
> uninformed about how the processors they use work, even in their
> best known and simplest aspects. Anyone who sees those -4's in
> existing .o and .so files cannot conclude anything other than
> "this Linux is bound together with rubber bands."
Interesting. Then your next task is to convince the dumb guys at Sun too
because their toolchain behaves exactly like the Linux toolchain...
bash-2.03$ uname -a
SunOS xxx.xxx.xxx 5.8 Generic_108529-13 i86pc i386 i86pc
bash-2.03$ cat t.s
.text
.globl bar
.type bar, @function
bar:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
call foo
leave
ret
bash-2.03$ as -V
as: Sun WorkShop 6 99/08/16
Usage: as [-V] [-Q{y,n}] [-s]
[-S[aAbBcClL]] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-xF] [-F] [-b] [-i] file.s ...
bash-2.03$ as -o t.o t.s
bash-2.03$ dis t.o
**** DISASSEMBLER ****
disassembly for t.o
section .text
bar()
0: 55 pushl %ebp
1: 8b ec movl %esp,%ebp
3: 83 ec 08 subl $0x8,%esp
6: e8 fc ff ff ff call <extern>
b: c9 leave
c: c3 ret
bash-2.03$ elfdump -r t.o
Relocation Section: .rel.text
type offset section with
respect to
R_386_PC32 0x7 .rel.text foo
http://docs.sun.com/app/docs/doc/817-1984/6mhm7pl28?q=Solaris+10+&s=t&a=view
--
Eric Botcazou
- BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/17
- Re: BUG elf32-i386 R_386_PC32 done wrong, Ian Lance Taylor, 2006/06/19
- Re: BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/23
- Re: BUG elf32-i386 R_386_PC32 done wrong, Ian Lance Taylor, 2006/06/23
- Re: BUG elf32-i386 R_386_PC32 done wrong,
Eric Botcazou <=
- Re: BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/24
- Re: BUG elf32-i386 R_386_PC32 done wrong, Eric Botcazou, 2006/06/24
- Re: BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/25
- Re: BUG elf32-i386 R_386_PC32 done wrong, Eric Botcazou, 2006/06/24
- Re: BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/25
- Re: BUG elf32-i386 R_386_PC32 done wrong, Eric Botcazou, 2006/06/24
- Re: BUG elf32-i386 R_386_PC32 done wrong, Ian Lance Taylor, 2006/06/24
- Re: BUG elf32-i386 R_386_PC32 done wrong, Airr, 2006/06/25
- Re: BUG elf32-i386 R_386_PC32 done wrong, Ian Lance Taylor, 2006/06/25
- Re: BUG elf32-i386 R_386_PC32 done wrong, doctor electron, 2006/06/25