Skip to content

Commit

Permalink
need GOT only for PIC code (x86_32)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Feb 7, 2014
1 parent aa5e034 commit d83819e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/elfobj.c
Expand Up @@ -3271,7 +3271,7 @@ static void obj_rtinit()
buf->writeByte(0);
off += 4;

if (!I64)
if (config.flags3 & CFG3pic && I32)
{ // see cod3_load_got() for reference
// push EBX
buf->writeByte(0x50 + BX);
Expand Down Expand Up @@ -3426,7 +3426,7 @@ static void obj_rtinit()

#endif // REQUIRE_DSO_REGISTRY

if (!I64)
if (config.flags3 & CFG3pic && I32)
{ // mov EBX,[EBP-4-align]
buf->writeByte(0x8B);
buf->writeByte(modregrm(1,BX,BP));
Expand Down

0 comments on commit d83819e

Please sign in to comment.