Skip to content

Commit 1acb086

Browse files
Revert "[libc] Add link.h and elf.h headers" (#97931)
Reverts #97924
1 parent ba25507 commit 1acb086

File tree

10 files changed

+2
-150
lines changed

10 files changed

+2
-150
lines changed

libc/config/linux/aarch64/headers.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ set(TARGET_PUBLIC_HEADERS
22
libc.include.assert
33
libc.include.ctype
44
libc.include.dlfcn
5-
libc.include.elf
65
libc.include.errno
76
libc.include.features
87
libc.include.fenv
98
libc.include.float
109
libc.include.stdint
1110
libc.include.inttypes
1211
libc.include.limits
13-
libc.include.link
1412
libc.include.math
1513
libc.include.pthread
1614
libc.include.signal

libc/config/linux/x86_64/headers.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ set(TARGET_PUBLIC_HEADERS
33
libc.include.ctype
44
libc.include.dirent
55
libc.include.dlfcn
6-
libc.include.elf
76
libc.include.errno
87
libc.include.fcntl
98
libc.include.features
@@ -12,7 +11,6 @@ set(TARGET_PUBLIC_HEADERS
1211
libc.include.stdint
1312
libc.include.inttypes
1413
libc.include.limits
15-
libc.include.link
1614
libc.include.math
1715
libc.include.pthread
1816
libc.include.sched

libc/include/CMakeLists.txt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ add_gen_header(
5656
DEF_FILE dlfcn.h.def
5757
GEN_HDR dlfcn.h
5858
DEPENDS
59-
.llvm-libc-types.Dl_info
6059
.llvm-libc-macros.dlfcn_macros
6160
.llvm_libc_common_h
6261
)
@@ -368,25 +367,6 @@ add_gen_header(
368367
.llvm-libc-types.posix_spawn_file_actions_t
369368
)
370369

371-
add_gen_header(
372-
link
373-
DEF_FILE link.h.def
374-
GEN_HDR link.h
375-
DEPENDS
376-
.llvm_libc_common_h
377-
.llvm-libc-types.struct_dl_phdr_info
378-
.llvm-libc-types.__dl_iterate_phdr_callback_t
379-
.llvm-libc-macros.link_macros
380-
)
381-
382-
add_gen_header(
383-
elf
384-
DEF_FILE elf.h.def
385-
GEN_HDR elf.h
386-
DEPENDS
387-
.llvm-libc-macros.elf_macros
388-
)
389-
390370
# TODO: Not all platforms will have a include/sys directory. Add the sys
391371
# directory and the targets for sys/*.h files conditional to the OS requiring
392372
# them.

libc/include/llvm-libc-macros/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,3 @@ add_macro_header(
283283
HDR
284284
dlfcn-macros.h
285285
)
286-
287-
add_macro_header(
288-
elf_macros
289-
HDR
290-
elf-macros.h
291-
)

libc/include/llvm-libc-macros/elf-macros.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

libc/include/llvm-libc-macros/link-macros.h

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_LIBC_MACROS_LINK_MACROS_H
10-
#define LLVM_LIBC_MACROS_LINK_MACROS_H
11-
12-
#include "elf-macros.h"
13-
149
#ifdef __LP64__
15-
#define ElfW(type) Elf64_##type
10+
#define ElfW(type) Elf64_ ## type
1611
#else
17-
#define ElfW(type) Elf32_##type
18-
#endif
19-
20-
struct link_map {
21-
ElfW(Addr) l_addr;
22-
char *l_name;
23-
ElfW(Dyn) * l_ld;
24-
struct link_map *l_next, *l_prev;
25-
};
26-
27-
struct r_debug {
28-
int r_version;
29-
struct link_map *r_map;
30-
ElfW(Addr) r_brk;
31-
enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
32-
ElfW(Addr) r_ldbase;
33-
};
34-
12+
#define ElfW(type) Elf32_ ## type
3513
#endif

libc/include/llvm-libc-types/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,6 @@ add_header(thrd_t HDR thrd_t.h DEPENDS .__thread_type)
8989
add_header(tss_t HDR tss_t.h)
9090
add_header(tss_dtor_t HDR tss_dtor_t.h)
9191
add_header(__atexithandler_t HDR __atexithandler_t.h)
92-
add_header(Dl_info HDR Dl_info.h)
93-
add_header(
94-
__dl_iterate_phdr_callback_t
95-
HDR __dl_iterate_phdr_callback_t.h
96-
DEPENDS
97-
.size_t
98-
)
99-
add_header(
100-
struct_dl_phdr_info
101-
HDR struct_dl_phdr_info.h
102-
DEPENDS
103-
.__dl_iterate_phdr_callback_t
104-
.size_t
105-
libc.include.llvm-libc-macros.link_macros
106-
)
107-
10892
add_header(speed_t HDR speed_t.h)
10993
add_header(tcflag_t HDR tcflag_t.h)
11094
add_header(struct_termios HDR struct_termios.h DEPENDS .cc_t .speed_t .tcflag_t)

libc/include/llvm-libc-types/Dl_info.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

libc/include/llvm-libc-types/struct_dl_phdr_info.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)