summaryrefslogtreecommitdiff
path: root/ldso/ldso/frv
AgeCommit message (Collapse)Author
2017-06-21remove the not useful disclaimerWaldemar Brodkorb
2017-01-14ldso: do not resolve relocations for debug, dig them up when debuggingWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2016-02-07frv: resurrect port somehow, totally untestedWaldemar Brodkorb
The FR-V port is really broken, and I have no emulator or hardware for this platform. I tried to get some hardware from RedHat, who made the FR-V port initially. Unfortunately Fujitsi didn't agreed to sent me some of their unused spare hardware lying @RedHat. As I invested some time to get stuff compiled, I decided to add the code and may be anytime later I can gain access to some emulator or hardware. GDB simulator for FR-V doesn't support booting Linux AFAIK.
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: 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-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>
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-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-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-04-24- fixup asm. No object-code changesBernhard Reutner-Fischer
2006-07-05update licenseMike Frysinger
2006-06-19eat extraneous ; and insert some whitespace where it belongsMike Frysinger
2006-03-08macro out the /10 operation so arches can have their own versions ... and ↵Mike Frysinger
create some default macros for do_rem/do_div_10 so we dont duplicate the samething in many arch header files
2005-11-21Partly undo earlier patch on vapier's requestPeter S. Mazinger
2005-11-21Guard debug_sym/debug_reloc, make sure elfinterp.c sees __SUPPORT_LD_DEBUG__Peter S. Mazinger
2005-09-21__set_errno must be redefined after #include "sys/syscall.h".Joakim Tjernlund
syscall.h should not have it's own version of __set_errno, instead syscall.h should include errno.h(see powerpc) since errno handling depends on threads/no threads. I leave the the fixing of syscall.h since there might be some smaller compile problems.
2005-07-07rip out all the duplicated debug code and move into a shared fileMike Frysinger
2004-12-11Partial commit of a patch from Alexandre Oliva:Eric Andersen
Here's an updated version of the patch I posted about a month ago. It leaves -nostdinc alone, and uses -print-file-name=include instead of -print-search-dirs to figure out where GCC's internal headers are. Please let me know whether there are any portions of this patch you'd like me to break into smaller pieces, to rework, or to give up trying to get into uClibc :-) Thanks,
2004-09-23Make do_rem() safe. From Peter Kjellerstedt.Joakim Tjernlund
2004-09-23Don't allow undefined global symbols to pass.Joakim Tjernlund
Move COPY relocs back to _dl_do_reloc().
2004-09-07We do not use dl_iterate_phdr, so no need to define itEric Andersen
2004-08-26Partial patch from Alexandre Oliva to update the frv portEric Andersen
2004-08-25Patch from Stefan Allius:Joakim Tjernlund
Remove unused function parameter in ldso. Remove echo option '-e' since it is not supported on Solaris.
2004-08-17Let ldso decide if it should relocate itselft a second time. ThisJoakim Tjernlund
is needed if ldso should use libcs malloc whenever possible. Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by libdl.
2004-08-13Fixup PAGE_SIZE problemsEric Andersen
-Erik
2004-07-30Whitespace cleanupEric Andersen
2004-05-14Alexandre Oliva writes:Eric Andersen
Here are a number of minor changes to FR-V-specific bits of the uClibc port: - I've adjusted the definition of _dl_mmap to cope with the fact that there will be a definition for an mmap2-only system. - We don't have COPY relocs, so optimize the copy reloc-related code away. - Change the page size to 16KiB, to match the ABI spec, and not a stale value I'd copied from a linker config file. Oops. - Fix error handling in clone and vfork; parts of the changes by David Howells <dhowells@redhat.com> - Rearrange includes in crtreloc.c. - Change the API of __syscall_error, to reduce code size. - Improve __syscall_return in terms of code size, so as to enable tail-calling of __syscall_error, at least within libc. Ideally, __syscall_error should be hidden within libc.so, but this didn't work because of libdl. I haven't looked into why, and figured I'd leave it visible for now. - Rename enumerators and macros in sys/ucontext.h to reduce namespace pollution.
2004-05-12Add a local '_dl_errno' to be used by syscalls in ldso, allowingEric Andersen
useful syscall failure diagnostics.
2004-04-20Cope with gcc 3.4's more aggressive persuit of attribute unusedEric Andersen
2004-02-18Minor change to better match recent changes to other archesEric Andersen
2004-02-18Alexandre Oliva writes:Eric Andersen
This patch adds code to uClibc to support a new ABI designed for the FR-V architecture, that enables text segments of executables and shared libraries to be shared by multiple processes on an OS such as uClinux, that can run on FR-V processors without an MMU. Patches for binutils and GCC have just been posted in the corresponding mailing lists. The binutils patch was approved, but there's one additional patch pending review, that I posted this week. An updated GCC patch will be posted to gcc-patches@gcc.gnu.org as soon as I complete testing (I used a known-good compiler to test the uClibc patch below). Since the existing dynamic loader code didn't support independent relocation of segments, it required changes that were somewhat extensive. I've added a number of new machine-specific macros to try to keep the platform and ABI-specific details outside the generic code. I hope this is not a problem.