Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
df774284
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df774284
编写于
12月 18, 2007
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mac OS X x86 assembler support.
上级
3e583572
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
28 addition
and
5 deletion
+28
-5
crypto/perlasm/x86asm.pl
crypto/perlasm/x86asm.pl
+4
-1
crypto/perlasm/x86gas.pl
crypto/perlasm/x86gas.pl
+24
-4
未找到文件。
crypto/perlasm/x86asm.pl
浏览文件 @
df774284
...
...
@@ -170,7 +170,7 @@ sub ::asm_init
$filename
=
$fn
;
$i386
=
$cpu
;
$elf
=
$cpp
=
$coff
=
$aout
=
$win32
=
$netware
=
$mwerks
=
0
;
$elf
=
$cpp
=
$coff
=
$aout
=
$
macosx
=
$
win32
=
$netware
=
$mwerks
=
0
;
if
((
$type
eq
"
elf
"))
{
$elf
=
1
;
require
"
x86gas.pl
";
}
elsif
((
$type
eq
"
a
\
.out
"))
...
...
@@ -185,6 +185,8 @@ sub ::asm_init
#{ $netware=1; $mwerks=1; require "x86nasm.pl"; }
elsif
((
$type
eq
"
win32
"))
{
$win32
=
1
;
require
"
x86masm.pl
";
}
elsif
((
$type
eq
"
macosx
"))
{
$aout
=
1
;
$macosx
=
1
;
require
"
x86gas.pl
";
}
else
{
print
STDERR
<<"EOF";
Pick one target type from
...
...
@@ -193,6 +195,7 @@ Pick one target type from
coff - GAS/COFF such as Win32 targets
win32n - Windows 95/Windows NT NASM format
nw-nasm - NetWare NASM format
macosx - Mac OS X
EOF
exit
(
1
);
}
...
...
crypto/perlasm/x86gas.pl
浏览文件 @
df774284
...
...
@@ -125,7 +125,7 @@ sub ::function_begin_B
push
(
@out
,"
.globl
\t
$func
\n
")
if
(
$global
);
if
(
$
::
coff
)
{
push
(
@out
,"
.def
\t
$func
;
\t
.scl
\t
2;
\t
.type
\t
32;
\t
.endef
\n
");
}
elsif
(
$
::
aout
and
!
$
::
pic
)
elsif
(
(
$
::
aout
and
!
$
::
pic
)
or
$
::
macosx
)
{
}
else
{
push
(
@out
,"
.type
$func
,
\@
function
\n
");
}
...
...
@@ -171,6 +171,14 @@ sub ::file_end
if
(
$
::
elf
)
{
push
(
@out
,"
$tmp
,4
\n
");
}
else
{
push
(
@out
,"
$tmp
\n
");
}
}
if
(
$
::
macosx
)
{
grep
{
s/^\.extern\s+.*$//
}
@out
;
if
(
%non_lazy_ptr
)
{
push
(
@out
,"
.section __IMPORT,__pointers,non_lazy_symbol_pointers
\n
");
foreach
$i
(
keys
%non_lazy_ptr
)
{
push
(
@out
,"
$non_lazy_ptr
{
$i
}:
\n
.indirect_symbol
\t
$i
\n
.long
\t
0
\n
");
}
}
}
push
(
@out
,
$initseg
)
if
(
$initseg
);
}
...
...
@@ -195,15 +203,20 @@ sub ::picmeup
{
&::
call
(
&::
label
("
PIC_me_up
"));
&::
set_label
("
PIC_me_up
");
&::
blindpop
(
$dst
);
&::
add
(
$dst
,"
\$
${nmdecor}
_GLOBAL_OFFSET_TABLE_+[.-
"
.
&::
label
("
PIC_me_up
")
.
"
]
");
$base
=
$dst
;
$reflabel
=&::
label
("
PIC_me_up
");
}
if
(
$
::
macosx
)
{
my
$indirect
=&::
static_label
("
$nmdecor$sym
\$
non_lazy_ptr
");
&::
mov
(
$dst
,
&::
DWP
("
$indirect
-
$reflabel
",
$base
));
$non_lazy_ptr
{"
$nmdecor$sym
"}
=
$indirect
;
}
else
{
&::
lea
(
$dst
,
&::
DWP
("
${nmdecor}
_GLOBAL_OFFSET_TABLE_+[.-
$reflabel
]
",
$base
));
}
&::
mov
(
$dst
,
&::
DWP
("
$nmdecor$sym
\@
GOT
",
$dst
));
}
}
else
{
&::
lea
(
$dst
,
&::
DWP
(
$sym
));
}
}
...
...
@@ -224,6 +237,13 @@ ___
{
$initseg
.=<<
___
;
# applies to both Cygwin and Mingw
.
section
.
ctors
.
long
$f
___
}
elsif
(
$
::
macosx
)
{
$initseg
.=
<<___;
.mod_init_func
.align 2
.long $f
___
}
elsif
(
$
::
aout
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录