Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-07-24 | Fix address calculation for _DYNAMIC. We want to address of _DYNAMIC itself, | Mark Kettenis | |
not the address of its GOT entry. The current code mixed the high bits of the GOT entry address with the low bits of the true address. This only worked by accident for small binaries where _DYNAMIC and its GOT entry happen to reside on the same page. ok guenther@, mortimer@ | |||
2018-06-16 | Add add PIE support for m88k (requires gcc4 toolchain) | Philip Guenther | |
Convert __cerror to hidden visibility. from miod@ | |||
2017-08-12 | Fix dependency generation: pass ${DFLAGS} and -MF explicitly | Philip Guenther | |
problem noted by deraadt@ ok espie@ | |||
2017-08-11 | _dl_printf is no longer referenced by RELOC_{JMPREL,DYN,GOT}; delete the stub | Philip Guenther | |
ok kettenis@ | |||
2017-07-10 | remove misc. depend and yacc nits that no longer matter. | Marc Espie | |
okay millert@ | |||
2017-02-26 | Our certbegin/certend is always PIC, so remove the non-PIC MD_SECT_CALL_FUNC() | Mark Kettenis | |
implementations. ok guenther@ | |||
2017-02-26 | Use a long branch (using movw/movt) to implement MD_SECT_CALL_FUNC. | Mark Kettenis | |
Necessary (but perhaps not suffcient) to build large binaries on arm. ok guenther@ | |||
2017-02-19 | Move static variables from .data to .bss by not initializing them to zero | Philip Guenther | |
ok kettenis@ | |||
2017-01-29 | remove unused variables | Charles Longeau | |
ok krw@ guenther@ | |||
2017-01-24 | Fix passing &_DYNAMIC to _dl_boot_bind; makes -static -pie work. | Mark Kettenis | |
2017-01-21 | Make crtbegin.c and crtbeginS.c consistent on stylistic points | Philip Guenther | |
ok kettenis@ | |||
2017-01-21 | Pull in declarations for main() and __init() to make clang happy. | Philip Guenther | |
Mark __init() as hidden ok kettenis@ deraadt@ | |||
2017-01-21 | Fix misspelling in comment | Philip Guenther | |
2017-01-21 | amd64 can build rcrt0.o with the stack-protector | Philip Guenther | |
ok kettenis@ deraadt@ | |||
2017-01-21 | Declare the symbols that label the .ctors, .dtors, .eh_frame, and .jcr | Philip Guenther | |
sections as extern hidden arrays of indefinite size, so that the compiler (well, clang) doesn't believe it knows the exact contents and thus optimize things into infinite loops. Actually set the symbols to be in the sections and insert the leading and trailing values via __asm(). Problem pointed out by patrick@ testing and ok kettenis@ | |||
2017-01-19 | MD_START is now always ___start, so expand and eliminate it | Philip Guenther | |
ok phessler@ deraadt@ | |||
2017-01-11 | Add support for AArch64. | Patrick Wildt | |
2017-01-02 | Remove the (now unused) code to determine the page size. Also get rid of | Mark Kettenis | |
the extern declaration of __got_{start,end}. ok guenther@ | |||
2016-12-24 | Replace return by break; requested by guenther@ | Mark Kettenis | |
2016-12-24 | Remove code that reprotects the GOT based on the __got_start and __got_end | Mark Kettenis | |
symbols. Either the PT_LOAD RWX->RX case ot PT_GNU_RELRO should cover this already for anything we care about. And lld, the llvm linker, doesn't emit the __got_start and __got_end symbols and there are good reasons to leave it that way. ok guenther@ | |||
2016-12-22 | Don't make __CTOR_LIST__ and __DTOR_LIST__ const. This makes the .ctors and | Mark Kettenis | |
.dtors sections writable just like they are in crtend.o and code generated by compilers. This is necessary to make sure that linkers that respect the ELF spec a bit better (such as lld) correctly concatenate the secttions. ok deraadt@ | |||
2016-12-19 | A couple more unused variables. | Kenneth R Westerback | |
tweak & ok kettenis@ | |||
2016-11-08 | Use sed -i to post-process .depend. This avoids permission issues caused | Martin Natano | |
by the file being created in /tmp. tweaks and ok tb | |||
2016-10-15 | unify tmp depend generation. | Marc Espie | |
- simpler uniform pattern - put the tmpfile in OBJDIR, so that mv doesn't whine about groups when using a separate builduser. okay millert@ | |||
2016-10-03 | Simplify code that sets up a stack frame for running .init code to be more | Mark Kettenis | |
AEABI-like. ok tom@, jsg@ | |||
2016-09-26 | Now that vax has been removed, nothing defined MD_NO_CLEANUP anymore. | Mark Kettenis | |
ok guenther@ | |||
2016-09-08 | Implement self-relocation for -static -pie on arm. Also removes some | Mark Kettenis | |
unecessary code from the normal startup code and do some general cleanup to make the code more readable. ok guenther@, jsg@ | |||
2016-09-03 | Enable PIE on arm now that sjlj exceptions are no longer used after | Jonathan Gray | |
the switch to eabi. This does not include static PIE which will be handled later. A specific sequence of steps is required to cross over this change, using a snapshot is the easiest way to do so. ok kettenis@ | |||
2016-09-01 | retire sparc | Ted Unangst | |
2016-08-08 | Look for a PT_GNU_RELRO section and, if present, mprotect that range | Philip Guenther | |
instead of the [__got_start, __got_end) range. Also, instead of mprotecting the [__plt_start, __plt_end) range, just scan for sections which are both writable and executable and mprotect them to read-only. (This part was stolen from kettenis@) ok kettenis@ | |||
2016-08-07 | Teach mips64 to pass &_DYNAMIC to _dl_boot_bind(). | Philip Guenther | |
mips64be testing by deraadt@ | |||
2016-08-07 | alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, so | Philip Guenther | |
save that and pass it to _dl_boot_bind() too | |||
2016-08-07 | Teach i386 to pass &_DYNAMIC to _dl_boot_bind() | Philip Guenther | |
2016-08-07 | Psych: amd64 has been passing &_DYNAMIC to _dl_boot_bind() for 19 months | Philip Guenther | |
2016-08-07 | Flip the #ifdef logic: amd64, i386, and mips64 were the only static PIE | Philip Guenther | |
archs using the #else case | |||
2016-07-05 | Missed a reference to dl_prebind.h | Philip Guenther | |
problem noted by Andrew Ngo (andrew.ngo (at) gmail.com) | |||
2016-05-11 | remove hppa64 port, which we never got going beyond broken single users. | Theo de Raadt | |
hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis | |||
2016-05-07 | Declare moncontrol(3) APIs in <sys/gmon.h> | Philip Guenther | |
Export _gmonparam again. Make gcrt0.o use an reserved name for _monstartup() ok millert@ | |||
2016-03-24 | Unbreak arm and m88k: COPY relocations for weak symbols that are overloaded | Philip Guenther | |
with strong symbols in ld.so don't do what we need, so put definitions back in crt0 and make ld.so update __progname like it does environ. report and testing patrick@ jsg@ | |||
2016-03-20 | Rearrange C runtime bits: now that ld.so exports environ and __progname, | Philip Guenther | |
move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@ | |||
2016-03-13 | crt0.c is already setting environ, so don't set it in MD_START_SETUP | Philip Guenther | |
ok kettenis@ mpi@ | |||
2016-03-12 | Call mprotect() via its hidden _lib_mprotect alias to avoid accidental | Philip Guenther | |
overriding ok deraadt@ kettenis@ | |||
2016-03-09 | We are done providing support for the vax. | Theo de Raadt | |
lots of agreement. | |||
2015-12-06 | Simplify the relocation code for the ld.so bootstrap and static pie: track | Philip Guenther | |
just the dynamic tags are needed instead of reusing the generic elf_object_t structure. testing and feedback from miod@ ok kettenis@ | |||
2015-11-10 | libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork() | Philip Guenther | |
stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@ | |||
2015-09-19 | We don't need to calculate the load offset. This also means we don't need | Mark Kettenis | |
to calculate the GOT address anymore. ok guenther@ (who spotted the latter bit) | |||
2015-09-19 | Make sure we set PROT_EXEC on the GOT for BSS-PLT binaries on powerpc. | Mark Kettenis | |
ok guenther@ | |||
2015-09-09 | Fetch the _GLOBAL)OFFSET_TABLE_ and _DYNAMIC pointers in a way that's | Mark Kettenis | |
compatible with the Secure-PLT ABI. | |||
2015-09-09 | Now that ld(1) will generate a read-only GOT for truly static binaries, we | Mark Kettenis | |
no longer have to use mprotect(2) to take away PROT_WRITE. This fixes ld -Z and paves the way for the new Secure-PLT ABI. ok miod@ | |||
2015-09-01 | In static binaries, invoke kbind() once to disable it. | Philip Guenther | |
With much assistance from miod@ ok deraadt@@ |