summaryrefslogtreecommitdiff
path: root/libexec/ld.so/alpha
AgeCommit message (Collapse)Author
2008-04-09Improve support for shared libs linked at non-zero addreses:Kurt Miller
- rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base. With help and okay drahn@
2008-02-24Use rounded down address when changing memory protections on the GOT, suchDale Rahn
that we don't accidentally touch the page after the GOT. Bug found on sparc64 affected other platforms as well. ok kettenis@
2007-11-27Make _dl_md_reloc_got() report errors, and take them into account.Miod Vallat
Fixes PR #5579.
2007-05-05Provide hook so that rthreads can provide a spinlock to protect from racesDale Rahn
in lazy binding. ok art@, kurt@
2006-10-28Only mprotect pages during relocation if the library is marked TEXTRELDale Rahn
mips64 version still needs testing.
2006-09-26switch alpha to gcc3; joint work with drahn@ and brad@Martin Reindl
ok drahn@ brad@ mickey@ deraadt@
2006-08-06Do not take shortcuts when the PLT size is 0; makes emacs work again on alpha.Mark Kettenis
ok drahn@
2006-08-06Work around an issue found when working with gcc3 on alpha,Dale Rahn
gcc2 nomally calls functions thru the gp (basically a function pointer), but gcc3 frequently calls directly to the plt. gcc2 does occasionally directly call to the plt. Currently how the plt/pltgot is fixed up on lazy binding, this will cause the dl_bind code to be called on each plt call causing a symbol resolution and plt fixup. This diff works around the problem partially by recognizing that a pltgot entry is already fixed and skips the symbol resolution. Since the pltgot is what is modified do not add PROT_EXEC permission to the mapping. While this is not an ideal fix, kettenis and I think it is better than before.
2006-05-03prebind - how to prelink a binary without throwing security out the windowDale Rahn
Prelink fixes the address of libraries making 'return to libc' attacks trival, prebind uses a different method to achieve most of the same gains, however without adding any security conerns. Still under development, now in-tree.
2006-02-22No need to include <machine/elf_machdep.h>Miod Vallat
2005-09-22Use std missing symbol print instead of MD custom, do not warn on weakDale Rahn
undefined symbols, or count them as failures. inspired kurt@
2005-09-21Simplify the internal symbol finding API, with some cleanup, prep forDale Rahn
next step. ok kurt@
2005-09-16Rework symbol lookup to more closely match sun's documentation, nowDale Rahn
treats dlopens as load groups. ok kurt@
2004-05-25provide one version of _dl_bcopy instead of copy in every arch; drahn@ okMichael Shalayeff
2004-05-25return object* the symbol is in for _dl_find_symbol*; drahn@ okMichael Shalayeff
2004-05-25spacingTheo de Raadt
2004-05-24Change define used to deal with PLT protection, use postive logic not negative.Dale Rahn
ok mickey@
2003-09-05Put in workaround for alpha so that non-lazy binding seems to work,Dale Rahn
however it is using some of the lazy binding values. With this patch LD_BIND_NOW=yes make does not core. ok deraadt@
2003-09-04Fix W^X mistake. If the dynamic linker is workin in non-lazy mode, itDale Rahn
should still mprotect the GOT and PLT as appropriate. ok deraadt@ miod@
2003-09-04Symbol cache for GOT lookup. When a symbol is found it is saved in a cacheDale Rahn
for future lookups in the same GOT relocation table. Uses static buffer for small symbol tables, mmap for larger ones. ok deraadt@
2003-09-02Fix PR 3371, symbol lookup in dlopen()ed objects is not correct. CorrectDale Rahn
behavior for RTLD_GLOBAL/RTLD_LOCAL is now supported. ok espie@
2003-07-28The fifth argument to _dl_find_symbol is a 'int size', not a SYM_ define.Dale Rahn
Fix several calls which had the incorrect but working define in that position It happened that SYM_NOTPLT was 0, which was the desired size value.
2003-07-09changes to ld.so to be compatible with newer binutils, requiresDale Rahn
slight changes in the startup code on most archs. ok art@ brad@
2003-07-06various proto, ansi, and knf repair. tested on all architectures thatTheo de Raadt
use it. (build may require make cleandir because of .depend balony)
2003-06-09pefo 3/4 licence cleanupsTheo de Raadt
2003-06-03three four gone.Artur Grabowski
2003-05-30When loading a shared object or libraries dependant object, load themDale Rahn
in random order. This will reduce the possiblity of a buffer overflow being able to predict the addresss of useful code. Can be disabled with the LD_NORANDOM environment variable for debugging purposes. ok deraadt.
2003-03-07Fix cut and paste on wrong line bugs, now like other versions. ok miod@Dale Rahn
2003-02-15After relocation is completed, remove write protection from GOT/PLT in ld.so.Dale Rahn
2003-02-15Paranoia about mprotect, mprotect page aligned regions for got and plt.Dale Rahn
2003-01-17Change the GOT initialization so that it is done in a function whichDale Rahn
initialized just the correct addresses instead of assuming that the GOT extends from _GLOBAL_OFFSET_TABLE_ to _DYNAMIC. Mostly from NetBSD. ok nate@
2003-01-16whitespace removal.Dale Rahn
2002-12-18Prepare for an upcoming ELF executable change. This will allow ld.so toDale Rahn
protect the GOT and PLT sections of the executable from being overwritten. This behavior is enabled by changes in the executable/shared object layout, and does not occur without the ld changes.
2002-11-14Make error messages on symbol lookup failures more useful.Dale Rahn
2002-10-25Some small fixes in MI code for mips backport. A new reloc md function,Per Fogelstrom
RELOC_GOT, was added to handle mips got bootstrap reloc. Also remove workaround used on previous versions of binutils for mips.
2002-10-21Simplify the ld.so asm api, the data is available other ways.Dale Rahn
tested by naddy@ and myself.
2002-09-01Make sure that the symbol return value is always initialized beforeDale Rahn
the address of it is passed to dl_find_symbol(). fixes xpdf lazy binding problem. ok art@
2002-08-23Change arguments to _dl_find_symbol() myself, warnnotfound, and inplt intoDale Rahn
a single flags field with bits representing each. Use defines to create the appropriate masks. Add a new argument sym_size to warn about symbols which have the incorrect size. This replaces 'ifdef notyet' code which was in several of the md files with a single version. sym_size == 0 means do not check, and symbols of type FUNC are not checked.
2002-08-21Split out MD makefile parts into separate files and doArtur Grabowski
some other cleanup in the Makefile. drahn@ ok.
2002-08-12Add support for REL type relocations, all currently supported archDale Rahn
use only RELA type relocations, but that could change. ok art@
2002-08-11The parameter dynp was never used, rather than pass in a dummy on mostDale Rahn
archs and a nasty calcuation on others, remove the parameter.
2002-08-11Fix for Elfbug, the Xtiherit problem which has been seen on most OpenBSDDale Rahn
ELF dynamic systems. This was due to an oddity in ELF where the address of fuctions refer to the PLT address in the program, rather than the actual function address.
2002-07-24ok i found itTheo de Raadt
2002-07-24back out broken stuff until it is fixedTheo de Raadt
2002-07-23match _dl_ syscall prototypes w/ the real syscalls prototypes, including ↵Michael Shalayeff
args and return values; art@ ok
2002-07-12Change ld.so search order/method to match the a.out ld.so.Dale Rahn
run destructors on dlclose() Move more symbols into _dl_ private space, so that the proper (libc) version of the function will be used. Add readdir() functionality to perform the proper library searching. Support DL_PRELOAD Do not relocate symbols if ld.so is being traced (and will exit). Misc lint cleanup. ok art@
2002-07-07typos/grammar/better wordsJan-Uwe Finck
in comments.
2002-06-05Cleanup/remove duplicate code that checks STAT_RELOC_DONE.Artur Grabowski
2002-06-05Get rid of an unnecessary typedef (for future cleanup).Artur Grabowski
2002-05-24more KNFTheo de Raadt