Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
1bbe166e
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1bbe166e
编写于
9月 09, 2018
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move tlsdesc and internal dl function declarations to dynlink.h
上级
15230afc
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
17 addition
and
20 deletion
+17
-20
ldso/dynlink.c
ldso/dynlink.c
+0
-4
src/internal/dynlink.h
src/internal/dynlink.h
+10
-0
src/ldso/__dlsym.c
src/ldso/__dlsym.c
+1
-2
src/ldso/dlclose.c
src/ldso/dlclose.c
+1
-2
src/ldso/dlerror.c
src/ldso/dlerror.c
+1
-2
src/ldso/dlinfo.c
src/ldso/dlinfo.c
+1
-4
src/ldso/dlopen.c
src/ldso/dlopen.c
+1
-2
src/ldso/dlsym.c
src/ldso/dlsym.c
+1
-2
src/ldso/tlsdesc.c
src/ldso/tlsdesc.c
+1
-2
未找到文件。
ldso/dynlink.c
浏览文件 @
1bbe166e
...
@@ -299,8 +299,6 @@ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
...
@@ -299,8 +299,6 @@ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
return
def
;
return
def
;
}
}
hidden
ptrdiff_t
__tlsdesc_static
(),
__tlsdesc_dynamic
();
static
void
do_relocs
(
struct
dso
*
dso
,
size_t
*
rel
,
size_t
rel_size
,
size_t
stride
)
static
void
do_relocs
(
struct
dso
*
dso
,
size_t
*
rel
,
size_t
rel_size
,
size_t
stride
)
{
{
unsigned
char
*
base
=
dso
->
base
;
unsigned
char
*
base
=
dso
->
base
;
...
@@ -2048,8 +2046,6 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void
...
@@ -2048,8 +2046,6 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void
return
ret
;
return
ret
;
}
}
hidden
void
__dl_vseterr
(
const
char
*
,
va_list
);
static
void
error
(
const
char
*
fmt
,
...)
static
void
error
(
const
char
*
fmt
,
...)
{
{
va_list
ap
;
va_list
ap
;
...
...
src/internal/dynlink.h
浏览文件 @
1bbe166e
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
#include <features.h>
#include <features.h>
#include <elf.h>
#include <elf.h>
#include <stdint.h>
#include <stdint.h>
#include <stddef.h>
#include "libc.h"
#if UINTPTR_MAX == 0xffffffff
#if UINTPTR_MAX == 0xffffffff
typedef
Elf32_Ehdr
Ehdr
;
typedef
Elf32_Ehdr
Ehdr
;
...
@@ -95,4 +97,12 @@ struct fdpic_dummy_loadmap {
...
@@ -95,4 +97,12 @@ struct fdpic_dummy_loadmap {
typedef
void
(
*
stage2_func
)(
unsigned
char
*
,
size_t
*
);
typedef
void
(
*
stage2_func
)(
unsigned
char
*
,
size_t
*
);
typedef
_Noreturn
void
(
*
stage3_func
)(
size_t
*
);
typedef
_Noreturn
void
(
*
stage3_func
)(
size_t
*
);
hidden
void
*
__dlsym
(
void
*
restrict
,
const
char
*
restrict
,
void
*
restrict
);
hidden
void
__dl_seterr
(
const
char
*
,
...);
hidden
int
__dl_invalid_handle
(
void
*
);
hidden
void
__dl_vseterr
(
const
char
*
,
va_list
);
hidden
ptrdiff_t
__tlsdesc_static
(),
__tlsdesc_dynamic
();
#endif
#endif
src/ldso/__dlsym.c
浏览文件 @
1bbe166e
#include <dlfcn.h>
#include <dlfcn.h>
#include "dynlink.h"
#include "libc.h"
#include "libc.h"
hidden
void
__dl_seterr
(
const
char
*
,
...);
static
void
*
stub_dlsym
(
void
*
restrict
p
,
const
char
*
restrict
s
,
void
*
restrict
ra
)
static
void
*
stub_dlsym
(
void
*
restrict
p
,
const
char
*
restrict
s
,
void
*
restrict
ra
)
{
{
__dl_seterr
(
"Symbol not found: %s"
,
s
);
__dl_seterr
(
"Symbol not found: %s"
,
s
);
...
...
src/ldso/dlclose.c
浏览文件 @
1bbe166e
#include <dlfcn.h>
#include <dlfcn.h>
#include "dynlink.h"
#include "libc.h"
#include "libc.h"
hidden
int
__dl_invalid_handle
(
void
*
);
int
dlclose
(
void
*
p
)
int
dlclose
(
void
*
p
)
{
{
return
__dl_invalid_handle
(
p
);
return
__dl_invalid_handle
(
p
);
...
...
src/ldso/dlerror.c
浏览文件 @
1bbe166e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdarg.h>
#include "pthread_impl.h"
#include "pthread_impl.h"
#include "dynlink.h"
#include "libc.h"
#include "libc.h"
char
*
dlerror
()
char
*
dlerror
()
...
@@ -50,8 +51,6 @@ hidden void __dl_seterr(const char *fmt, ...)
...
@@ -50,8 +51,6 @@ hidden void __dl_seterr(const char *fmt, ...)
va_end
(
ap
);
va_end
(
ap
);
}
}
hidden
int
__dl_invalid_handle
(
void
*
);
static
int
stub_invalid_handle
(
void
*
h
)
static
int
stub_invalid_handle
(
void
*
h
)
{
{
__dl_seterr
(
"Invalid library handle %p"
,
(
void
*
)
h
);
__dl_seterr
(
"Invalid library handle %p"
,
(
void
*
)
h
);
...
...
src/ldso/dlinfo.c
浏览文件 @
1bbe166e
#define _GNU_SOURCE
#define _GNU_SOURCE
#include <dlfcn.h>
#include <dlfcn.h>
#include "dynlink.h"
#include "libc.h"
#include "libc.h"
hidden
int
__dl_invalid_handle
(
void
*
);
hidden
void
__dl_seterr
(
const
char
*
,
...);
int
dlinfo
(
void
*
dso
,
int
req
,
void
*
res
)
int
dlinfo
(
void
*
dso
,
int
req
,
void
*
res
)
{
{
if
(
__dl_invalid_handle
(
dso
))
return
-
1
;
if
(
__dl_invalid_handle
(
dso
))
return
-
1
;
...
...
src/ldso/dlopen.c
浏览文件 @
1bbe166e
#include <dlfcn.h>
#include <dlfcn.h>
#include "dynlink.h"
#include "libc.h"
#include "libc.h"
hidden
void
__dl_seterr
(
const
char
*
,
...);
static
void
*
stub_dlopen
(
const
char
*
file
,
int
mode
)
static
void
*
stub_dlopen
(
const
char
*
file
,
int
mode
)
{
{
__dl_seterr
(
"Dynamic loading not supported"
);
__dl_seterr
(
"Dynamic loading not supported"
);
...
...
src/ldso/dlsym.c
浏览文件 @
1bbe166e
#include <dlfcn.h>
#include <dlfcn.h>
#include "dynlink.h"
void
*
__dlsym
(
void
*
restrict
,
const
char
*
restrict
,
void
*
restrict
);
void
*
dlsym
(
void
*
restrict
p
,
const
char
*
restrict
s
)
void
*
dlsym
(
void
*
restrict
p
,
const
char
*
restrict
s
)
{
{
...
...
src/ldso/tlsdesc.c
浏览文件 @
1bbe166e
#include <stddef.h>
#include <stddef.h>
#include <dynlink.h>
#include "libc.h"
#include "libc.h"
hidden
ptrdiff_t
__tlsdesc_static
(),
__tlsdesc_dynamic
();
ptrdiff_t
__tlsdesc_static
()
ptrdiff_t
__tlsdesc_static
()
{
{
return
0
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录