summaryrefslogtreecommitdiff
path: root/ldso/ldso/bfin
AgeCommit message (Collapse)Author
2015-03-22fix bfin compile, -msoft-float is not availableWaldemar Brodkorb
2013-03-07buildsys: Add missing $(SYMBOL_PREFIX) to symbol namesMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-29ldso: mark _start hiddenMike Frysinger
There's no need to export this symbol, so mark them all hidden. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-27ldso: bfin: add alias from __start to _startMike Frysinger
On Blackfin systems, we have underscore prefixes in our ABI. So instead of _start, we use __start. However, the makefile explicitly sets _start as the entry point to support toolchains that implicitly use other symbols as the default entry. It's easy enough to add a hidden alias in the Blackfin code for free to support this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26ldso: bfin: tweak styleMike Frysinger
No functional changes here. We don't need line continuations as gcc is smart enough to merge the multiple strings for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-25ldso: use ELF_xxx()/ElfW() helpersMike Frysinger
They expand into the same code, but using the ELF_xxx()/ElfW() macros makes it much easier to spot similarities between code bases. Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-27ldso: bfin: fix sram_flags initMike Frysinger
An earlier version had this, but was lost as code was shuffled around. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-27ldso: bfin: shrink sram mapping funcMike Frysinger
The L1 data and L2 code paths duplicate a lot, so unify them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-27ldso: fdpic: clean up styleMike Frysinger
There should (hopefully) be no functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-27ldso: fdpic: unify duplicate bfin/frv logicMike Frysinger
Much of the logic in the bfin/frv subdirs is FDPIC specific and not arch specific. So start a new fdpic/ subdir to keep common things. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-14ldso: silence harmless warning for !LDSO_PRELINK_SUPPORTBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-06ldso: unify pread syscall definitionMike Frysinger
A few arches want pread() defined, so move it to common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-06ldso: bfin/frv: drop dead simulator codeMike Frysinger
Nowhere do we define DYNAMIC_LOADER_IN_SIMULATOR, so drop the little bit of code that depends on it. At least in the Blackfin case, we can run an FDPIC ldso just fine under the simulator without hacks. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-06ldso: merge duplicate dl-syscalls.h code to common headerMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-01ldso: constify reloc array itselfMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-04Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: (32 commits) libubacktrace: fix backtrace support on arm-eabi, which needs libgcc_eh linked too getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r getaddrinfo.c: improve code readability. No functional changes string: remove unused variable x86_64: silence warning if !TLS buildsys: prettify ssp.c handling madvise is LINUX_SPECIFIC test_nptl: fix expected result for tst-cputimer[123] test_nptl: fix expected result for tst-clock2 test buildsys: make $(LOCAL_INSTALL_PATH) phony ether_aton: reject invalid input tests: disable ether tests if !HAS_SOCKET inet: add ether_aton testcase sysconf: clock_getres depends on HAS_REALTIME __rt_sigwaitinfo: depends on HAS_REALTIME buildsys: minor fixes in Makefile.arch for C6X buildsys: minor fixes in Makefile.arch for microblaze libubacktrace: enabled for all archs indeed. sparc: don't access fp registers when configured for no fpu libubacktrace: generic implementation based dwarf ... Conflicts: ldso/ldso/dl-elf.c ldso/ldso/mips/elfinterp.c ldso/ldso/x86_64/elfinterp.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-04-11Fix nommu handling of DT_TEXTRELBernd Schmidt
We have a problem with DT_TEXTREL shared libraries on nommu machines. The dynamic linker's strategy is to map the text segment read-only first, then look for DT_TEXTREL, and use mprotect to change protections if necessary. This fails on nommu, since a nommu kernel can decide to share the memory for private read-only file mappings, and mprotect doesn't (can't) do anything about this sharing. Existing nommu targets apparently have no need for this, but on C6X, we may need to assign library indices at run-time if no --dsbt-index option was passed to the linker at build time. Hence, the following patch, which instead of using mprotect, redoes the mapping with PF_W set. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2011-04-06Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: (137 commits) utils/ldd: Check for returned pointer from strrchr not the value it holds cris: add provide arch-specific vfork implementation lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined bump version to 0.9.32-rc3-git release 0.9.32-rc3 memalign: include sys/param.h for MAX arm/bits/atomic.h: Include common/bit/atomic.h for thumb1 wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace add libc_hidden_proto for wcs[n]casecmp_l really fix missing __libc_drand48_data Revert "missing prototype of __libc_drand48_data fixed" missing prototype of __libc_drand48_data fixed time.c, time.h: remove unused hidden strftime/strptime nanosleep.c: remove duplicated libc_hidden_proto ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31 _wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions time.c, wchar.h: remove unused hidden wcsftime str[n]casecmp.c: fix hidden usage remove unused hidden functions frv/memset.S: add missing libc_hidden_def ... Conflicts: ldso/ldso/ldso.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-03-09remove trailing ';' from _syscallX()Peter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-01-21Merge remote branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: bump version to 0.9.32-rc2-git release 0.9.32-rc2 nptl: Fix __USER_LABEL_PREFIX__ concatenatio nptl: fix start_thread() for _STACK_GROWS_UP ldso: get rid of _dl_lookup_hash Add protected symbols support for all architectures Revert "ldso/arm: Correct protected symbol resolution" Revert "ldso_sh: add support for protected symbols to SH" Revert "ldso/i386: support protected symbols" cris: Fix build issues syslog: fix 'everyone logs with user facility' __psfs_parse_spec: always use long int for %p buildsys: headers target should not depend on sysnum.h buildsys: fix make release target nptl: get rid of the last preprocessor warning when __ASSUME_TGKILL is not defined remove uClibc_ctype.h if !LOCALE Revert "Makefile.in: Add header to 'all' target" nptl: get rid of preprocessor warning when __ASSUME_TGKILL is not defined Conflicts: ldso/include/dl-hash.h ldso/ldso/arm/elfinterp.c ldso/ldso/avr32/elfinterp.c ldso/ldso/bfin/elfinterp.c ldso/ldso/cris/elfinterp.c ldso/ldso/dl-hash.c ldso/ldso/i386/elfinterp.c ldso/ldso/m68k/elfinterp.c ldso/ldso/mips/elfinterp.c ldso/ldso/powerpc/elfinterp.c ldso/ldso/sh/elfinterp.c ldso/ldso/sh64/elfinterp.c ldso/ldso/sparc/elfinterp.c ldso/ldso/x86_64/elfinterp.c ldso/ldso/xtensa/elfinterp.c ldso/libdl/libdl.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-20ldso: get rid of _dl_lookup_hashCarmelo Amoroso
Now _dl_find_hash and _dl_lookup_hash are exactly the same, we can get rid of the _dl_lookup_hash, reverting the _dl_find_hash from a wrapper of _dl_lookup_hash to its original role. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-20Add protected symbols support for all architecturesSalvatore Cro
Protected symbols are global symbols for which interposition is not allowed. We manage them in generic _dl_lookup_hash function. To handle protected symbols we need to get a reference to the module that defines the symbol itself. So we pass a new parameter 'struct symbol_ref' to the __dl_lookup_hash that is defined as below: struct symbol_ref { const ElfW(Sym) *sym; struct elf_resolve *tpnt; }; The tpnt field is used as an ouput parameter and refers to the module which defines the protected symbol. Further it can be used as output parameter for TLS relocations and FDPIC case. The sym field is instead used as an input parameter to detect the visibility of the symbol we are looking-up. In this way we get rid of different signatures for _dl_lookup_hash, allowing to remove the _dl_find_hash wrapper. This new structure is also suitable for prelink integration. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-10-11ldso: Extend prelink support for all other achitecturesFilippo Arcidiacono
Update Arch specific part of the dynamic linker to the latest cahnges required by prelink: - Use _dl_loaded_modules->scope as global symbol scope - Pass the sym argument (or NULL) to the _dl_find_hash - Update _dl_parse, _dl_do_reloc, _dl_do_lazy_reloc and _dl_parse_relocation_information to reflect the change of the scope argument's type - Add the call to _dl_debug_lookup used for trace prelinking. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-11-15ldso: Add missing newlines to some debug messagesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-23Blackfin: rename __dl_boot to __startMike Frysinger
The entry symbol is __start rather than __dl_boot. While in the past this was silently ignored, now with common code checking the _start symbol in C code, we end up with link errors: ldso/ldso/ld-uClibc_so.a(ldso.oS): In function `__dl_get_ready_to_run': ldso/ldso/ldso.c:(.text+0x2b30): undefined reference to `__start' collect2: ld returned 1 exit status make[1]: *** [lib/ld-uClibc.so] Error 1 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23Blackfin: fix incorrect attribute orderMike Frysinger
The order of attributes in a function definition matters and in a few places in the Blackfin code, it was being applied to the return type instead of the function itself. In file included from ldso/ldso/ldso.c:43: ldso/ldso/bfin/elfinterp.c: At top level: ldso/ldso/bfin/elfinterp.c:42: warning: '__visibility__' attribute ignored on non-class types In file included from ldso/ldso/bfin/elfinterp.c:341, from ldso/ldso/ldso.c:43: libc/sysdeps/linux/bfin/crtreloc.c: At top level: libc/sysdeps/linux/bfin/crtreloc.c:91: warning: 'visibility' attribute ignored on non-class types Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23Blackfin: add elf_machine_load_address() stubMike Frysinger
The Blackfin port never defined elf_machine_load_address() because the one place this code is called never matters to us. But without it, common code likes to hit a build failure, so stub it out. ldso/ldso/dl-startup.c: In function '_dl_start': ldso/ldso/dl-startup.c:170: warning: implicit declaration of function 'elf_machine_load_address' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23silence warnings in Blackfin ldso codeMike Frysinger
In file included from ./ldso/include/ldso.h:135, from ldso/ldso/ldso.c:34: ./ldso/ldso/bfin/dl-inlines.h: In function '__dl_init_loadaddr_map': ./ldso/ldso/bfin/dl-inlines.h:43: warning: assignment makes pointer from integer without a cast In file included from ldso/ldso/ldso.c:43: ldso/ldso/bfin/elfinterp.c: In function '_dl_do_lazy_reloc': ldso/ldso/bfin/elfinterp.c:299: warning: assignment makes pointer from integer without a cast ldso/ldso/ldso.c: In function '_dl_get_ready_to_run': ldso/ldso/ldso.c:534: warning: assignment makes integer from pointer without a cast Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23Blackfin: add support for automatic loading of L2 SRAM regionsJie Zhang
These match the kernel/etc... pieces already merged. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01Blackfin: make sure all relocs are uppercaseMike Frysinger
This is to match changes in the toolchain. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-05Use __always_inline instead of __inline__Carmelo Amoroso
2009-01-28Remove check for the relocation type check in the resolver,Carmelo Amoroso
from all archs. Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
2009-01-14ldso: performs bootstrap relocations only if required by the arch.Carmelo Amoroso
It is controlled by ARCH_NEEDS_BOOTSTRAP_RELOCS macro. Signed-off-by: Jirka <olsajiri@gmail.com> Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-01-04ldso/ldso/dl-startup.c: make _dl_elf_main static; remove one dead variable.Denis Vlasenko
ldso/ldso/avr32/dl-startup.h: remove superfluous definition of START() macro. ldso/ldso/*/dl-startup.h: fix a typo in comment text data bss dec hex filename - 16752 244 92 17088 42c0 lib/ld-uClibc.so + 16709 240 92 17041 4291 lib/ld-uClibc.so
2008-12-03- Use runtime pagesize (Jeremy Kerr)Bernhard Reutner-Fischer
Some powerpc machines can support 64k pages, enabled by the CONFIG_64K_PAGES option in linux. However, the uClibc dynamic loader won't currently work on these machines, as it uses hard-coded values (PAGE_ALIGN, ADDR_ALIGN and OFFS_ALIGN) in the ldso architecture-specific headers. When running on a kernel with 64k pages, ld.so tries to mmap with 4k-aligned addresses, rather than 64k, so mmap fails with -EINVAL. When booting a 64k machine with a uClibc dynamic linker, init fails with: /init:500: can't map '/lib/libc.so.0' /init:500: can't map '/lib/libc.so.0' /init:500: can't map '/lib/libc.so.0' /init: can't load library 'libc.so.0' Kernel panic - not syncing: Attempted to kill init! This change allows ld.so determine these alignment masks at runtime, rather than compile-time. Since we have the _dl_pagesize variable available, we can use that to generate the appropriate masks. Since almost all of the architectures can use the common definitions for the _ALIGN macros, we can consolidate them all in ldso.h, and override in the sysdep headers where necessary (ie, mips). This allows me to start a uClibc-based root fs on a 64k machine. Signed-off-by: Jeremy Kerr <jk at ozlabs org>
2008-10-24- tidy up inline:Bernhard Reutner-Fischer
ldso and syscalls are __always_inline (the latter would need more cleanup)
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-04-24- fixup asm. No object-code changesBernhard Reutner-Fischer
2008-02-08Fix the recent dladdr changes so that they compile on FD-PIC targets.Bernd Schmidt
2008-01-18Update dl-inlines.h from Blackfin repository.Bernd Schmidt
2008-01-08Some more Blackfin/FDPIC ldso merging work. Include dl-inlines.h when itBernd Schmidt
exists, and move some definitions to their proper place.
2007-12-03Blackfin FD-PIC patch 3/6.Bernd Schmidt
Change _dl_find_hash to _dl_lookup_hash, as on the NPTL branch. _dl_find_hash is now a wrapper function around it; unlike on the NPTL branch, it retains the old interface so that not all callers need to be changed. _dl_lookup_hash can optionally give its caller a pointer to the module where the symbol was found. Introduce ELF_RTYPE_CLASS_DLSYM for lookups from libdl. Spelling fixes in the Blackfin port, since Alex Oliva's original version of these patches used _dl_find_hash_mod as the name of the function rather than _dl_lookup_hash.
2007-11-28Fix merging error: a macro was renamed.Bernd Schmidt
2007-11-23Change test for a define that got renamed a while ago.Bernd Schmidt
2006-11-17Bernd Schmidt writes: [blackfin updates] add support for FDPIC and include ↵Mike Frysinger
L1 functions