Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[libc] Add link.h and elf.h headers" #97931

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions libc/config/linux/aarch64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ set(TARGET_PUBLIC_HEADERS
libc.include.assert
libc.include.ctype
libc.include.dlfcn
libc.include.elf
libc.include.errno
libc.include.features
libc.include.fenv
libc.include.float
libc.include.stdint
libc.include.inttypes
libc.include.limits
libc.include.link
libc.include.math
libc.include.pthread
libc.include.signal
Expand Down
2 changes: 0 additions & 2 deletions libc/config/linux/x86_64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.ctype
libc.include.dirent
libc.include.dlfcn
libc.include.elf
libc.include.errno
libc.include.fcntl
libc.include.features
Expand All @@ -12,7 +11,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.stdint
libc.include.inttypes
libc.include.limits
libc.include.link
libc.include.math
libc.include.pthread
libc.include.sched
Expand Down
20 changes: 0 additions & 20 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ add_gen_header(
DEF_FILE dlfcn.h.def
GEN_HDR dlfcn.h
DEPENDS
.llvm-libc-types.Dl_info
.llvm-libc-macros.dlfcn_macros
.llvm_libc_common_h
)
Expand Down Expand Up @@ -368,25 +367,6 @@ add_gen_header(
.llvm-libc-types.posix_spawn_file_actions_t
)

add_gen_header(
link
DEF_FILE link.h.def
GEN_HDR link.h
DEPENDS
.llvm_libc_common_h
.llvm-libc-types.struct_dl_phdr_info
.llvm-libc-types.__dl_iterate_phdr_callback_t
.llvm-libc-macros.link_macros
)

add_gen_header(
elf
DEF_FILE elf.h.def
GEN_HDR elf.h
DEPENDS
.llvm-libc-macros.elf_macros
)

# TODO: Not all platforms will have a include/sys directory. Add the sys
# directory and the targets for sys/*.h files conditional to the OS requiring
# them.
Expand Down
6 changes: 0 additions & 6 deletions libc/include/llvm-libc-macros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,3 @@ add_macro_header(
HDR
dlfcn-macros.h
)

add_macro_header(
elf_macros
HDR
elf-macros.h
)
18 changes: 0 additions & 18 deletions libc/include/llvm-libc-macros/elf-macros.h

This file was deleted.

26 changes: 2 additions & 24 deletions libc/include/llvm-libc-macros/link-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_MACROS_LINK_MACROS_H
#define LLVM_LIBC_MACROS_LINK_MACROS_H

#include "elf-macros.h"

#ifdef __LP64__
#define ElfW(type) Elf64_##type
#define ElfW(type) Elf64_ ## type
#else
#define ElfW(type) Elf32_##type
#endif

struct link_map {
ElfW(Addr) l_addr;
char *l_name;
ElfW(Dyn) * l_ld;
struct link_map *l_next, *l_prev;
};

struct r_debug {
int r_version;
struct link_map *r_map;
ElfW(Addr) r_brk;
enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
ElfW(Addr) r_ldbase;
};

#define ElfW(type) Elf32_ ## type
#endif
16 changes: 0 additions & 16 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,6 @@ add_header(thrd_t HDR thrd_t.h DEPENDS .__thread_type)
add_header(tss_t HDR tss_t.h)
add_header(tss_dtor_t HDR tss_dtor_t.h)
add_header(__atexithandler_t HDR __atexithandler_t.h)
add_header(Dl_info HDR Dl_info.h)
add_header(
__dl_iterate_phdr_callback_t
HDR __dl_iterate_phdr_callback_t.h
DEPENDS
.size_t
)
add_header(
struct_dl_phdr_info
HDR struct_dl_phdr_info.h
DEPENDS
.__dl_iterate_phdr_callback_t
.size_t
libc.include.llvm-libc-macros.link_macros
)

add_header(speed_t HDR speed_t.h)
add_header(tcflag_t HDR tcflag_t.h)
add_header(struct_termios HDR struct_termios.h DEPENDS .cc_t .speed_t .tcflag_t)
Expand Down
19 changes: 0 additions & 19 deletions libc/include/llvm-libc-types/Dl_info.h

This file was deleted.

17 changes: 0 additions & 17 deletions libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h

This file was deleted.

26 changes: 0 additions & 26 deletions libc/include/llvm-libc-types/struct_dl_phdr_info.h

This file was deleted.

Loading