提交 9d1b5614 编写于 作者: A Andy Polyakov

At least OpenBSD implements PIC in the same way ELF does.

上级 416b19c6
...@@ -566,13 +566,13 @@ sub main'picmeup ...@@ -566,13 +566,13 @@ sub main'picmeup
___ ___
push(@out,$tmp); push(@out,$tmp);
} }
elsif ($main'pic && $main'elf) elsif ($main'pic && ($main'elf || $main'aout))
{ {
push(@out,"\t.align\t8\n"); push(@out,"\t.align\t8\n");
&main'call(&main'label("PIC_me_up")); &main'call(&main'label("PIC_me_up"));
&main'set_label("PIC_me_up"); &main'set_label("PIC_me_up");
&main'blindpop($dst); &main'blindpop($dst);
&main'add($dst,"\$_GLOBAL_OFFSET_TABLE_+[.-" . &main'add($dst,"\$$under"."_GLOBAL_OFFSET_TABLE_+[.-".
&main'label("PIC_me_up") . "]"); &main'label("PIC_me_up") . "]");
&main'mov($dst,&main'DWP($sym."\@GOT",$dst)); &main'mov($dst,&main'DWP($sym."\@GOT",$dst));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册