Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
bac2279c
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
1 年多 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bac2279c
编写于
12月 01, 2022
作者:
Y
yinchuang
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add cache for relocation
Signed-off-by:
N
yinchuang
<
yinchuang@huawei.com
>
上级
dec5ecd3
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
16 addition
and
4 deletion
+16
-4
porting/linux/user/ldso/dynlink.c
porting/linux/user/ldso/dynlink.c
+16
-4
未找到文件。
porting/linux/user/ldso/dynlink.c
浏览文件 @
bac2279c
...
@@ -112,6 +112,10 @@ struct dso {
...
@@ -112,6 +112,10 @@ struct dso {
/* mark the dso status */
/* mark the dso status */
unsigned
int
flags
;
unsigned
int
flags
;
int
cache_sym_index
;
struct
dso
*
cache_dso
;
Sym
*
cache_sym
;
Phdr
*
phdr
;
Phdr
*
phdr
;
int
phnum
;
int
phnum
;
size_t
phentsize
;
size_t
phentsize
;
...
@@ -954,10 +958,18 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
...
@@ -954,10 +958,18 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
ctx
=
type
==
REL_COPY
?
head
->
syms_next
:
head
;
ctx
=
type
==
REL_COPY
?
head
->
syms_next
:
head
;
struct
verinfo
vinfo
=
{
.
s
=
name
,
.
v
=
""
};
struct
verinfo
vinfo
=
{
.
s
=
name
,
.
v
=
""
};
vinfo
.
use_vna_hash
=
get_vna_hash
(
dso
,
sym_index
,
&
vinfo
.
vna_hash
);
vinfo
.
use_vna_hash
=
get_vna_hash
(
dso
,
sym_index
,
&
vinfo
.
vna_hash
);
if
(
dso
->
cache_sym_index
==
sym_index
)
{
def
=
(
struct
symdef
){
.
dso
=
dso
->
cache_dso
,
.
sym
=
dso
->
cache_sym
};
}
else
{
def
=
(
sym
->
st_info
>>
4
)
==
STB_LOCAL
def
=
(
sym
->
st_info
>>
4
)
==
STB_LOCAL
?
(
struct
symdef
){
.
dso
=
dso
,
.
sym
=
sym
}
?
(
struct
symdef
){
.
dso
=
dso
,
.
sym
=
sym
}
:
dso
!=
&
ldso
?
find_sym_by_saved_so_list
(
type
,
ctx
,
&
vinfo
,
type
==
REL_PLT
,
dso
)
:
dso
!=
&
ldso
?
find_sym_by_saved_so_list
(
type
,
ctx
,
&
vinfo
,
type
==
REL_PLT
,
dso
)
:
find_sym2
(
ctx
,
&
vinfo
,
type
==
REL_PLT
,
0
,
dso
->
namespace
);
:
find_sym2
(
ctx
,
&
vinfo
,
type
==
REL_PLT
,
0
,
dso
->
namespace
);
dso
->
cache_sym_index
=
sym_index
;
dso
->
cache_dso
=
def
.
dso
;
dso
->
cache_sym
=
def
.
sym
;
}
if
(
!
def
.
sym
&&
(
sym
->
st_shndx
!=
SHN_UNDEF
if
(
!
def
.
sym
&&
(
sym
->
st_shndx
!=
SHN_UNDEF
||
sym
->
st_info
>>
4
!=
STB_WEAK
))
{
||
sym
->
st_info
>>
4
!=
STB_WEAK
))
{
if
(
dso
->
lazy
&&
(
type
==
REL_PLT
||
type
==
REL_GOT
))
{
if
(
dso
->
lazy
&&
(
type
==
REL_PLT
||
type
==
REL_GOT
))
{
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
c4e0fa76
·
12月 14, 2022
mentioned in commit
c4e0fa76
mentioned in commit c4e0fa76299217854b40c1a7a8aa76f7be919773
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录