Changeset e175d69 in mainline for uspace/lib/c/arch
- Timestamp:
- 2011-05-01T13:08:18Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 042fbe0
- Parents:
- a41577e (diff), e515a827 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch/ia32
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/Makefile.inc
ra41577e re175d69 36 36 arch/$(UARCH)/src/setjmp.S \ 37 37 arch/$(UARCH)/src/stacktrace.c \ 38 arch/$(UARCH)/src/stacktrace_asm.S 38 arch/$(UARCH)/src/stacktrace_asm.S \ 39 arch/$(UARCH)/src/rtld/dynamic.c \ 40 arch/$(UARCH)/src/rtld/reloc.c 39 41 40 42 .PRECIOUS: arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ia32/_link.ld.in
ra41577e re175d69 1 #ifndef SHLIB 1 2 STARTUP(LIBC_PATH/arch/UARCH/src/entry.o) 2 3 ENTRY(__entry) 4 #endif 3 5 4 6 PHDRS { 5 #if def LOADER7 #if defined(LOADER) || defined(DLEXE) 6 8 interp PT_INTERP; 7 9 text PT_LOAD FILEHDR PHDRS FLAGS(5); … … 10 12 #endif 11 13 data PT_LOAD FLAGS(6); 14 #if defined(SHLIB) || defined(DLEXE) 15 dynamic PT_DYNAMIC; 16 #endif 12 17 debug PT_NOTE; 13 18 } 14 19 15 20 SECTIONS { 16 #if def LOADER21 #if defined(LOADER) || defined(DLEXE) 17 22 .interp : { 18 23 *(.interp); 19 24 } :interp 20 25 #endif 26 #ifdef LOADER 21 27 . = 0x70001000 + SIZEOF_HEADERS; 22 28 #else … … 31 37 *(.rodata .rodata.*); 32 38 } :text 39 40 #if defined(SHLIB) || defined(DLEXE) 41 .rel.plt : { 42 *(.rel.plt); 43 } 44 /* 45 *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt 46 * without alignment gap or DT_REL will be broken 47 */ 48 .rel.dyn : { 49 *(.rel.*); 50 } :text 33 51 52 .plt : { 53 *(.plt); 54 } :text 55 56 .dynsym : { 57 *(.dynsym); 58 } :text 59 60 .dynstr : { 61 *(.dynstr); 62 } :text 63 64 .hash : { 65 *(.hash); 66 } :text 67 #endif 34 68 . = . + 0x1000; 69 70 #if defined(SHLIB) || defined(DLEXE) 71 .dynamic : { 72 *(.dynamic); 73 } :data :dynamic 74 #endif 35 75 36 76 .data : { … … 38 78 } :data 39 79 80 #if defined(SHLIB) || defined(DLEXE) 81 .data.rel : { 82 *(.data.rel .data.rel.*); 83 } :data 84 85 .got : { 86 *(.got); 87 } :data 88 .got.plt : { 89 *(.got.plt); 90 } :data 91 #endif 92 93 #ifndef DLEXE 40 94 .tdata : { 41 95 _tdata_start = .; … … 49 103 50 104 _tls_alignment = ALIGNOF(.tdata); 105 #endif 51 106 52 107 .bss : { 108 *(.dynbss); 53 109 *(COMMON); 54 110 *(.bss); -
uspace/lib/c/arch/ia32/src/syscall.S
ra41577e re175d69 32 32 __syscall_fast_func: 33 33 .long __syscall_slow 34 .size __syscall_fast_func, . - __syscall_fast_func 34 35 35 36 .text … … 71 72 */ 72 73 .global __syscall_fast 74 .type __syscall_fast, @function 75 73 76 __syscall_fast: 74 77 pushl %ebx … … 95 98 popl %ebx 96 99 ret 100 101 .size __syscall_fast, . - __syscall_fast -
uspace/lib/c/arch/ia32/src/tls.c
ra41577e re175d69 37 37 #include <tls.h> 38 38 #include <sys/types.h> 39 #include <align.h> 39 40 40 41 tcb_t * __alloc_tls(void **data, size_t size) … … 48 49 } 49 50 51 /* 52 * Rtld TLS support 53 */ 54 55 typedef struct { 56 unsigned long int ti_module; 57 unsigned long int ti_offset; 58 } tls_index; 59 60 void __attribute__ ((__regparm__ (1))) 61 *___tls_get_addr(tls_index *ti); 62 63 void __attribute__ ((__regparm__ (1))) 64 *___tls_get_addr(tls_index *ti) 65 { 66 size_t tls_size; 67 uint8_t *tls; 68 69 /* Calculate size of TLS block */ 70 tls_size = ALIGN_UP(&_tbss_end - &_tdata_start, &_tls_alignment); 71 72 /* The TLS block is just before TCB */ 73 tls = (uint8_t *)__tcb_get() - tls_size; 74 75 return tls + ti->ti_offset; 76 } 77 50 78 /** @} 51 79 */
Note:
See TracChangeset
for help on using the changeset viewer.