[Issue 4583] PIC code not working: EBX register set incorrectly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 6 02:23:00 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4583



--- Comment #2 from Johannes Pfau <johannespfau at gmail.com> 2010-08-06 02:22:55 PDT ---
Yes I know, but the problem occurs even before the called function is executed:
The PLT is a table containing executable code. If you do an position
independent function call, you call into this PLT code, not directly into your
target function. And these PLT instructions require EBX to be set to the GOT
address.

I strogly recommend reading
http://www.skyfree.org/linux/references/ELF_Format.pdf especially the section
about PLT, page 48 and page 49, I think the explanation there is very good.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list