Changes in / [92a89b1:fb5f28e] in mainline
- Files:
-
- 6 added
- 17 edited
-
HelenOS.config (modified) (1 diff)
-
abi/include/abi/asmtool.h (modified) (1 diff)
-
defaults/amd64/Makefile.config (modified) (1 diff)
-
uspace/Makefile.common (modified) (4 diffs)
-
uspace/app/init/untar.c (modified) (1 diff)
-
uspace/drv/bus/usb/ohci/ohci_regs.h (modified) (1 diff)
-
uspace/lib/c/arch/amd64/Makefile.inc (modified) (1 diff)
-
uspace/lib/c/arch/amd64/include/libarch/rtld/dynamic.h (added)
-
uspace/lib/c/arch/amd64/include/libarch/rtld/elf_dyn.h (added)
-
uspace/lib/c/arch/amd64/include/libarch/rtld/module.h (added)
-
uspace/lib/c/arch/amd64/include/libarch/tls.h (modified) (1 diff)
-
uspace/lib/c/arch/amd64/src/entry.S (modified) (1 diff)
-
uspace/lib/c/arch/amd64/src/rtld/dynamic.c (added)
-
uspace/lib/c/arch/amd64/src/rtld/reloc.c (added)
-
uspace/lib/c/arch/amd64/src/thread_entry.S (modified) (1 diff)
-
uspace/lib/c/arch/amd64/src/tls.c (modified) (2 diffs)
-
uspace/lib/c/arch/ia32/include/libarch/rtld/module.h (added)
-
uspace/lib/c/generic/elf/elf_mod.c (modified) (2 diffs)
-
uspace/lib/c/generic/rtld/dynamic.c (modified) (1 diff)
-
uspace/lib/c/generic/rtld/module.c (modified) (2 diffs)
-
uspace/lib/c/include/rtld/elf_dyn.h (modified) (3 diffs)
-
uspace/lib/pcut/src/os/generic.c (modified) (1 diff)
-
uspace/lib/untar/untar.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r92a89b1 rfb5f28e 578 578 579 579 % Dynamic linking support 580 ! [PLATFORM= ia32] CONFIG_RTLD (n/y)581 ! [PLATFORM=abs32le|PLATFORM=a md64|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_RTLD (n)580 ! [PLATFORM=amd64|PLATFORM=ia32] CONFIG_RTLD (y/n) 581 ! [PLATFORM=abs32le|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=riscv64|PLATFORM=sparc64] CONFIG_RTLD (n) 582 582 583 583 % Build shared libraries -
abi/include/abi/asmtool.h
r92a89b1 rfb5f28e 56 56 SYMBOL_END(func) 57 57 58 #ifdef __PIC__ 59 #define FUNCTION_REF(func) func@PLT 60 #else 61 #define FUNCTION_REF(func) func 62 #endif 63 58 64 #endif 59 65 -
defaults/amd64/Makefile.config
r92a89b1 rfb5f28e 65 65 CONFIG_BFB_BPP = 16 66 66 67 # Dynamic linking support 68 CONFIG_RTLD = y 69 70 # Build shared libraries 71 CONFIG_BUILD_SHARED_LIBS = y 72 73 # Link against shared libraries 74 CONFIG_USE_SHARED_LIBS = y 75 67 76 # Include development files (headers, libraries) 68 77 CONFIG_DEVEL_FILES = y -
uspace/Makefile.common
r92a89b1 rfb5f28e 112 112 113 113 AFLAGS = --fatal-warnings 114 LDFLAGS = -Wl,--fatal-warnings,--warn-common 114 LDFLAGS = -Wl,--fatal-warnings,--warn-common -Wl,-z,max-page-size=0x1000 115 115 116 116 ifeq ($(STATIC_NEEDED),y) … … 120 120 STATIC_BUILD = y 121 121 else 122 ifeq ($(CONFIG_USE_SHARED_LIBS),y) 123 STATIC_BUILD = n 122 ifeq ($(CONFIG_BUILD_SHARED_LIBS),y) 123 ifeq ($(CONFIG_USE_SHARED_LIBS),y) 124 STATIC_BUILD = n 125 else 126 ifeq ($(LIBRARY),) 127 STATIC_BUILD = y 128 else 129 STATIC_BUILD = n 130 endif 131 endif 124 132 else 125 133 STATIC_BUILD = y … … 300 308 LIBARGS := $(addprefix -L$(USPACE_PREFIX)/lib/, $(LIBS)) $(addprefix -l, $(LIBS)) 301 309 310 ifneq ($(LIBRARY),libc) 311 LIBTAGS := $(LIBC_PREFIX)/tag $(LIBTAGS) 312 endif 313 302 314 .PHONY: all all-test clean fasterclean depend 303 315 … … 369 381 $(AR) rc $@ $(LOBJECTS) 370 382 371 $(SLIBRARY): $(LIBRARY).la 383 $(SLIBRARY): $(LIBRARY).la $(LIBTAGS) 372 384 $(CC) $(CFLAGS) $(LIB_LDFLAGS) $(EXTRA_LDFLAGS) -Wl,-Map,$@.map -o $@ -Wl,--whole-archive $(LIBRARY).la -Wl,--no-whole-archive $(LIBARGS) $(BASE_LIBS) 373 385 -
uspace/app/init/untar.c
r92a89b1 rfb5f28e 45 45 typedef struct { 46 46 const char *dev; 47 47 48 48 service_id_t sid; 49 49 aoff64_t offset; -
uspace/drv/bus/usb/ohci/ohci_regs.h
r92a89b1 rfb5f28e 153 153 * ohci_regs_t.control 154 154 */ 155 155 156 156 /* Control-bulk service ratio */ 157 157 #define C_CBSR_1_1 (0x0) -
uspace/lib/c/arch/amd64/Makefile.inc
r92a89b1 rfb5f28e 34 34 arch/$(UARCH)/src/tls.c \ 35 35 arch/$(UARCH)/src/stacktrace.c \ 36 arch/$(UARCH)/src/stacktrace_asm.S 36 arch/$(UARCH)/src/stacktrace_asm.S \ 37 arch/$(UARCH)/src/rtld/dynamic.c \ 38 arch/$(UARCH)/src/rtld/reloc.c 37 39 38 40 ARCH_AUTOCHECK_HEADERS = \ -
uspace/lib/c/arch/amd64/include/libarch/tls.h
r92a89b1 rfb5f28e 45 45 void *self; 46 46 void *fibril_data; 47 void **dtv; 48 void *pad; 47 49 } tcb_t; 48 50 -
uspace/lib/c/arch/amd64/src/entry.S
r92a89b1 rfb5f28e 47 47 # %rdi was deliberately chosen as the first argument is also in %rdi 48 48 # Pass PCB pointer to __c_start (no operation) 49 call __c_start49 call FUNCTION_REF(__c_start) -
uspace/lib/c/arch/amd64/src/thread_entry.S
r92a89b1 rfb5f28e 46 46 # 47 47 movq %rax, %rdi 48 call __thread_main48 call FUNCTION_REF(__thread_main) 49 49 SYMBOL_END(__thread_entry) -
uspace/lib/c/arch/amd64/src/tls.c
r92a89b1 rfb5f28e 38 38 #include <stddef.h> 39 39 40 #ifdef CONFIG_RTLD 41 #include <rtld/rtld.h> 42 #endif 43 40 44 tcb_t *tls_alloc_arch(size_t size, size_t align) 41 45 { … … 48 52 } 49 53 54 /* 55 * Rtld TLS support 56 */ 57 58 typedef struct { 59 unsigned long int ti_module; 60 unsigned long int ti_offset; 61 } tls_index; 62 63 void __attribute__((__regparm__(1))) 64 *__tls_get_addr(tls_index *ti); 65 66 void __attribute__((__regparm__(1))) 67 *__tls_get_addr(tls_index *ti) 68 { 69 uint8_t *tls; 70 71 #ifdef CONFIG_RTLD 72 if (runtime_env != NULL) { 73 return rtld_tls_get_addr(runtime_env, __tcb_get(), 74 ti->ti_module, ti->ti_offset); 75 } 76 #endif 77 /* Get address of static TLS block */ 78 tls = tls_get(); 79 return tls + ti->ti_offset; 80 } 81 50 82 /** @} 51 83 */ -
uspace/lib/c/generic/elf/elf_mod.c
r92a89b1 rfb5f28e 420 420 seg_ptr = (void *) seg_addr; 421 421 422 DPRINTF("Load segment at addr %p, size 0x%zx\n", (void *) seg_addr, 423 entry->p_memsz); 422 DPRINTF("Load segment at addr %p, size 0x%zx, flags %c%c%c\n", (void *) seg_addr, 423 entry->p_memsz, 424 (entry->p_flags & PF_R) ? 'r' : '-', 425 (entry->p_flags & PF_W) ? 'w' : '-', 426 (entry->p_flags & PF_X) ? 'x' : '-'); 424 427 425 428 if (entry->p_align > 1) { … … 484 487 return EE_OK; 485 488 486 rc = as_area_change_flags(seg_ptr, flags); 489 DPRINTF("as_area_change_flags(%p, %x)\n", 490 (uint8_t *) base + bias, flags); 491 rc = as_area_change_flags((uint8_t *) base + bias, flags); 487 492 if (rc != EOK) { 488 493 DPRINTF("Failed to set memory area flags.\n"); -
uspace/lib/c/generic/rtld/dynamic.c
r92a89b1 rfb5f28e 64 64 d_ptr = (void *)((uint8_t *)dp->d_un.d_ptr + bias); 65 65 d_val = dp->d_un.d_val; 66 DPRINTF("tag=%u ptr=0x% x val=%u\n", (unsigned)dp->d_tag,67 (u nsigned)d_ptr, (unsigned)d_val);66 DPRINTF("tag=%u ptr=0x%zx val=%zu\n", (unsigned)dp->d_tag, 67 (uintptr_t)d_ptr, (uintptr_t)d_val); 68 68 69 69 switch (dp->d_tag) { -
uspace/lib/c/generic/rtld/module.c
r92a89b1 rfb5f28e 50 50 #include <rtld/rtld_arch.h> 51 51 #include <rtld/module.h> 52 #include <libarch/rtld/module.h> 52 53 53 54 #include "../private/libc.h" … … 206 207 DPRINTF("filename:'%s'\n", name_buf); 207 208 208 rc = elf_load_file_name(name_buf, ELDF_RW, &info);209 rc = elf_load_file_name(name_buf, RTLD_MODULE_LDF, &info); 209 210 if (rc != EE_OK) { 210 211 printf("Failed to load '%s'\n", name_buf); -
uspace/lib/c/include/rtld/elf_dyn.h
r92a89b1 rfb5f28e 39 39 #include <libarch/rtld/elf_dyn.h> 40 40 41 #define ELF32_R_SYM(i) ((i) >>8)41 #define ELF32_R_SYM(i) ((i) >> 8) 42 42 #define ELF32_R_TYPE(i) ((unsigned char)(i)) 43 44 #define ELF64_R_SYM(i) ((i) >> 32) 45 #define ELF64_R_TYPE(i) ((i) & 0xffffffffL) 43 46 44 47 struct elf32_dyn { … … 47 50 elf_word d_val; 48 51 elf32_addr d_ptr; 52 } d_un; 53 }; 54 55 struct elf64_dyn { 56 elf_sxword d_tag; 57 union { 58 elf_xword d_val; 59 elf64_addr d_ptr; 49 60 } d_un; 50 61 }; … … 61 72 }; 62 73 74 struct elf64_rel { 75 elf64_addr r_offset; 76 elf_xword r_info; 77 }; 78 79 struct elf64_rela { 80 elf64_addr r_offset; 81 elf_xword r_info; 82 elf_sxword r_addend; 83 }; 84 63 85 #ifdef __32_BITS__ 64 86 typedef struct elf32_dyn elf_dyn_t; 65 87 typedef struct elf32_rel elf_rel_t; 66 88 typedef struct elf32_rela elf_rela_t; 89 #endif 90 91 #ifdef __64_BITS__ 92 typedef struct elf64_dyn elf_dyn_t; 93 typedef struct elf64_rel elf_rel_t; 94 typedef struct elf64_rela elf_rela_t; 67 95 #endif 68 96 -
uspace/lib/pcut/src/os/generic.c
r92a89b1 rfb5f28e 121 121 FORMAT_COMMAND(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1, 122 122 self_path, (test)->id, tempfile_name); 123 123 124 124 PCUT_DEBUG("Will execute <%s> (temp file <%s>) with system().", 125 125 command, tempfile_name); -
uspace/lib/untar/untar.c
r92a89b1 rfb5f28e 154 154 return rc; 155 155 } 156 156 157 157 while (true) { 158 158 tar_header_raw_t header_raw;
Note:
See TracChangeset
for help on using the changeset viewer.
