History log of /openbsd-current/libexec/ld.so/i386/ldasm.S
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_6_2_BASE
# 1.32 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


# 1.31 16-Aug-2017 deraadt

remove accidentally duplicated cpp chunks
ok kettenis


# 1.30 15-Aug-2017 deraadt

Align text locations to 16 (instead of 4) to match modern recommendations
(generally associated with hardwired BTC limitations). And then fill
those alignments with 0xcc (int 3) to match our trapsled model. Resulting
binaries show no sequential nop's.
ok mlarkin kettenis mortimer


Revision tags: OPENBSD_6_1_BASE
# 1.29 24-Jan-2017 guenther

On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of
simply exiting, via helper functions _dl_die(), _dl_diedie(), and
_dl_oom().

prompted by a complaint from jsing@
ok jsing@ deraadt@


# 1.28 28-Aug-2016 guenther

ld.so doesn't need gettimeofday or lstat stubs any more

ok deraadt@


# 1.27 07-Aug-2016 guenther

Teach i386 to pass &_DYNAMIC to _dl_boot_bind()


Revision tags: OPENBSD_6_0_BASE
# 1.26 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


# 1.25 21-Mar-2016 bluhm

Rename the system call sendsyslog2 to sendsyslog. Keep the old one
as osendsyslog for a while. The three argument variant is the only
one that will stay.
input kettenis@; OK deraadt@


# 1.24 21-Mar-2016 guenther

Switch ld.so's stack smash handler from sendsyslog to sendsyslog2
and pass the LOG_CONS flag like libc's handler.

ok deraadt@ bluhm@ (who had a similar diff)


Revision tags: OPENBSD_5_9_BASE
# 1.23 15-Nov-2015 deraadt

ldd(1) sets environment variable LD_TRACE_LOADED_OBJECTS to tell ld.so
that it should show information about the program it loads, rather than
run it. In that specific case, ld.so can pledge to "stdio rpath" to
ensure that code path in ld.so has no bugs.
Yes, a pledge in ld.so.... who'd have thought!
ok guenther


# 1.22 19-Sep-2015 guenther

kbind has eliminated the need for and use of the bind lock. Delete it, the
the callback, and the sigprocmask stub.
Keep around the DL_SETBINDLCK case until libpthread stops using it.

discussed with miod@ at l2k15
ok kettenis@


# 1.21 13-Sep-2015 guenther

Rename __sysctl syscall to just sysctl, as the userland wrapper is no longer
necessary

ok deraadt@ jsing@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.20 22-Sep-2014 brad

Correct the token used.

Pointed out by LLVM.

ldasm.S:111:74: error: unexpected token in '.type' directive
.section ".text" ; .align 4 ; .global _dl_issetugid ; .type _dl_issetugid%function ;_dl_issetugid: ; movl $253,%eax; int $0x80 ; jb .L_cerr ; ret
^

ok guenther@


Revision tags: OPENBSD_5_6_BASE
# 1.19 14-Jul-2014 deraadt

Now that we have sendsyslog(2), we can directly use it in the
(previously completely retarded) stack_smash_handler of ld.so
ok beck miod tedu


# 1.18 09-Jul-2014 guenther

_dl_fcntl() is no longer used; kill the stubs

ok otto@ miod@


# 1.17 06-Jul-2014 otto

move from sysclt(KERN_ARND) to getentropy(2); ok miod@, kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.16 23-Dec-2013 kettenis

Make ld.so pass its cleanup handler in %edx as required by the i386 System V
ABI, and stop calling atexit(4) directly from ld.so on i386.

ok guenther@


# 1.15 13-Aug-2013 guenther

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@


Revision tags: OPENBSD_5_4_BASE
# 1.14 01-Jun-2013 miod

Introduce ltrace(1). This tool works with ld.so to inject utrace record for
each plt call, allowing to trace a binary linked against shared library at the
public function call level.

To do so, ltrace(1) sets up some environment variables to enable plt tracing
in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy
binding and will send an utrace record in the plt resolver, without updating
the plt.

Minimal filtering capabilities are provided, inspired by Solaris' truss -u,
to limit tracing to libraries and/or symbol names. Non-traced libraries and
symbols will have the regular resolver processing, with the expected plt
update.

"Get it in" deraadt


# 1.13 05-Apr-2013 kurt

- Add ORIGIN, OSNAME, OSREL and PLATFORM substitution support for rpaths.
Improvements and okay matthew@, millert@, guenther@


Revision tags: OPENBSD_5_3_BASE
# 1.12 24-Oct-2012 guenther

Garbage-collect the _dl_stat() routine, now unused

ok matthew@ deraadt@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.11 16-Feb-2009 kurt

Fix passing of ps_strings, cleanup and obj_main values to _start() in crt0.

looks correct kettenis@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.10 03-May-2006 drahn

prebind - how to prelink a binary without throwing security out the window

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.


# 1.9 03-May-2006 drahn

Rewrite the ld.so syscall stubs as macros. no binary change.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.8 25-May-2004 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.7 09-Jul-2003 drahn

changes to ld.so to be compatible with newer binutils, requires
slight changes in the startup code on most archs. ok art@ brad@


# 1.6 03-Jun-2003 drahn

kill clause 3 and 4 from several of my copyrights, cleanup.


# 1.5 30-May-2003 drahn

When loading a shared object or libraries dependant object, load them
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.


Revision tags: OPENBSD_3_3_BASE
# 1.4 02-Feb-2003 deraadt

knf & ansi; drahn ok


# 1.3 18-Dec-2002 drahn

Prepare for an upcoming ELF executable change. This will allow ld.so to
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.


# 1.2 21-Oct-2002 drahn

Simplify the ld.so asm api, the data is available other ways.
tested by naddy@ and myself.


Revision tags: OPENBSD_3_2_BASE
# 1.1 23-Aug-2002 drahn

Support for i386 ELF. Not an indication that the change is going to be made,
just so that these files are maintained in the tree.