summaryrefslogtreecommitdiff
path: root/ldso
AgeCommit message (Collapse)Author
2015-04-13gcc 4.4 does not have __builtin_unreachableWaldemar Brodkorb
For avr32 we still use gcc 4.4 compiler, so exlude the usage of __builtin_unreachable here.
2015-04-13Revert "gcc 4.9.x produces some calls to abort()"Waldemar Brodkorb
This reverts commit 69ba9dcaa13bb8bbdc8630265d73298c39945416.
2015-04-13buildsys: Do not build crt upon pregenBernhard Reutner-Fischer
No need to build crt when just generating headers Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-29merge uClibc git masterWaldemar Brodkorb
2015-03-27Add support for R_ARC_NONE relocations.Andrew Burgess
The R_ARC_NONE relocation is generated when --gc-sections, used by the compile time linker, removes some sections. This is completely normal, and we can see that all other targets (based on random sampling) have support for R_*_NONE relocations (named for each target). Handling R_ARC_NONE involves doing nothing with it, which is nice and easy. Signed-off-by: Andrew Burgess <andrew.burgess@embecosm.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-26ldso: mark _dl_exit as noreturnBernhard Reutner-Fischer
Otherwise gcc might not understand that oom() ended control-flow and might emit an (untaken) reference to abort() in _dl_update_slotinfo() on e.g. SH4 which breaks linking ld-uClibc.so. Arguably -ffreestanding should prevent GCC from emitting this '.global abort' but alas, it does not, which is another bug.. Also mark the function cold to further lower the incoming frequency and branch probability. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24libm: honor NO_LONG_DOUBLE in ldouble_wrappersBernhard Reutner-Fischer
Fixes SH build breakage due to attempts to define hidden defs for unavailable long double functions. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-22fix bfin compile, -msoft-float is not availableWaldemar Brodkorb
2015-03-08okay, chicken-egg-problem solved really now. (was xtensa no thread failure)Waldemar Brodkorb
2015-03-07should have test it better, fix non-thread compileWaldemar Brodkorb
2015-03-07fix non-thread compile for xtensaWaldemar Brodkorb
2015-03-04Merge remote-tracking branch 'origin/upstream' into 1.0Waldemar Brodkorb
2015-02-27ldso: silence warningBernhard Reutner-Fischer
In file included from ldso/ldso/ldso.c:87:0: ldso/ldso/dl-startup.c: In function '_dl_start': ldso/ldso/dl-startup.c:184:32: warning: cast from pointer to integer of differennt size [-Wpointer-to-int-cast] auxvt[AT_BASE].a_un.a_val = (Elf32_Addr) &_begin; Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20gcc 4.9.x produces some calls to abort()Waldemar Brodkorb
For sh4/xtensa architectures there is an optimization bug, which does not allow to compile ld.so with gcc 4.9.2. Disable this optimization for sh4/xtensa and ld.so compile.
2015-02-20sync with uClibcWaldemar Brodkorb
2015-02-20ldso: silence warningBernhard Reutner-Fischer
symbol_addr was set but not used Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20Allow use of executable RUNPATH/RPATH when finding libraries.Steve Ellcey
This option will modify ldso so that it will use the executables RUNPATH/RPATH to find to find libraries even though this behavour is not standard. Setting this option causes the uclibc dynamic linker behavour to match the glibc dynamic linker. Signed-off-by: Steve Ellcey <sellcey@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20ARCv2 ISA supportVineet Gupta
This is next gen Instruction Set Architecture from Synopsys and basis for the ARC HS family of processors. http://www.synopsys.com/dw/ipdir.php?ds=arc-hs38-processor&elq_mid=5732&elq_cid=458802 http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/arc-hs/Pages/default.aspx Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: Conditionalise certain relocations as provided by TLS tools onlyVineet Gupta
uClibc mainline supports NPTL which in turns depends on TLS support in the tools (gcc/binutils), which is yet to be merged in dev branches. However there is some non NPTL code in uClibc, added as part of NPTL effort, which relies on certain relocations only provided by NPTL binutils. As a result building the current upstream even for LT.old breaks. So conditionalize that code on tools, bu tin lack of specific versions, we use NPTL enabling as a sign the tools are equipped to handle those relos. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: Conditionalise certain relocations as provided by TLS tools onlyVineet Gupta
uClibc mainline supports NPTL which in turns depends on TLS support in the tools (gcc/binutils), which is yet to be merged in dev branches. However there is some non NPTL code in uClibc, added as part of NPTL effort, which relies on certain relocations only provided by NPTL binutils. As a result building the current upstream even for LT.old breaks. So conditionalize that code on tools, bu tin lack of specific versions, we use NPTL enabling as a sign the tools are equipped to handle those relos. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-08Use executables RPATH/RUNPATH when searching for libraries.Waldemar Brodkorb
Patch by Steve Ellcey <sellcey@imgtec.com> on uClibc mailinglist.
2015-01-26merge upstream changesWaldemar Brodkorb
2015-01-25add support for $ORIGINWaldemar Brodkorb
This is for example required, used and tested with OpenJDK 7. No regressions found, while running the testsuite with embedded-test.
2015-01-23xtensa: ldso: drop unused address calculation from _dl_linux_resolveMax Filippov
The result of the calculation in register a12 is never used as the function _dl_linux_resolver only accepts 2 arguments. Drop it. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-01-23xtensa: ldso: coalesce dl_mprotect address rangesMax Filippov
This noticeably lowers the number of mprotect calls at program startup, e.g. for busybox: 7 calls vs 1835 calls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-01-01explicitly cast (even though this casting is not very nice)Thorsten Glaser
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2015-01-01make __dl_start, whose address is taken, into a real object typeThorsten Glaser
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2014-12-28relocation fixesWaldemar Brodkorb
From OpenWrt: https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/613-mips64_more_relocation_fixes.patch
2014-12-28sparc64 support was removed recentlyWaldemar Brodkorb
Remove leftover code.
2014-09-22xtensa: add support for NPTLWaldemar Brodkorb
Changes from: https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl Author: Chris Zankel <chris@zankel.net> Author: Baruch Siach <baruch@tkos.co.il>
2014-09-16buildsys: fix IS_IN_lib*Bernhard Reutner-Fischer
define NOT_IN_libc / IS_IN_libxxx appropriately to fix pthread_once Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-04ldso: Fix compile-error on noMMUBernhard Reutner-Fischer
Thanks to Waldemar Brodkorb for noticing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18NPTL: ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18ARC: ldso: Use @pcl syntax.Joern Rennecke
Signed-off-by: Joern Rennecke <joern.rennecke@embecosm.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-07-22ARC: ldso: Dont force frame pointer as it useless for unwinding on ARCVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-06-12arm: move check for BX to its own headerYann E. MORIN
As Will noticed, the header this check is currently done in is asm-only, and is not meant to be included from C code. This breaks compilation when compiled for a Thumb2-aware CPU. Move the BX check to its own header, and revert 7a246fd. Reported-by: Will Newton <will.newton@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Will Newton <will.newton@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23ldso: Add remaining relocation types to the tableGregory Fong
The table format is thrown off a bit because some of these names are too long to fit the previous format so they were put on their own lines. Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23ldso/mips: Remove redundant LD_DEBUG printsGregory Fong
These should have been protected by if (_dl_debug_reloc && _dl_debug_detail) , but since the previous change "ldso/mips: actually print results of each relocation" makes this redundant, just eliminate these prints instead. I think this is the only item that is still printing regardless of the value of LD_DEBUG when uClibc is built with SUPPORT_LD_DEBUG=y. Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23ldso/mips: actually print results of each relocationGregory Fong
The patched line was outside of the body of the loop over relocations and so would only print the results of the last relocation, fix that. Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23ldso: Fix misplaced declarationBernhard Reutner-Fischer
Apparently i made a typo when applying 278a06d7abcc8774ba9bb9c15779749c7e2d68cd sorry.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-08ldso: fix standalone execution on x86_64 architectureCédric VINCENT
If the dynamic linker is built with LDSO_STANDALONE_SUPPORT=y, it can load then run a dynamically linked program when explicitly invoked from the command line. This is used for test and prelink purposes, and also by other tools like PRoot to force the kernel to load the right ELF interpreter. This feature is currently broken on x86_64 since the number of command line arguments (ie. argc) passed from the kernel is an "elf_addr_t" (64 bit on x86_64), whereas it is read as an "unsigned int" (32 bit on x86_64). Ref: https://github.com/cedric-vincent/PRoot/issues/45 Signed-off-by: Cédric VINCENT <cedric.vincent@st.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-01xtensa: add missing .literal_position directivesMax Filippov
This addition allows building uClibc with -mtext-section-literals Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-15ldso: arm, metag: Use runtime pagesizeBernhard Reutner-Fischer
Use the generic runtime pagesize as per ce54b92b046b65464e2d16b3842f3e97e3e0f27e Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: ARC: tweak whitespace some moreBernhard Reutner-Fischer
Use spaces instead of tabs in the table to accomodate different tab settings. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: ARC whitespace tweaksVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: Add ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20Fix for SIGBUS error on MIPS64 with N64 ABIWaldemar Brodkorb
When accessing errno, a per thread variable, from _stdio_init a SIGBUS error happens. This change fixes the wrong relocation and debug output. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20ldso: use unlikely macroBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-11-12ldso: silence warnings in debug codeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-11-06ldso: remove duplicate function declarationsBaruch Siach
Commit e3dec33ba (powerpc: Add TLS and NPTL support) introduced a duplicate of _dl_add_to_slotinfo and _dl_initial_error_catch_tsd declarations. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>