summaryrefslogtreecommitdiff
path: root/Demos/DynamicLink
AgeCommit message (Collapse)Author
2020-08-12LibC: Avoid ninja-imports of system functionsBen Wiederhake
This adds a new header <sys/internals.h>, which provides access to LibC internals. This is in the interest of type-checking LibC itself, as well as enabling less-hacky access for uses like LinkDemo. And, of course, this progresses LibC towards building cleanly with -Wmissing-declarations.
2020-08-12DynamicLink: Tell compiler about invisible callsBen Wiederhake
This makes DynamicLink, and in fact all Demos, build cleanly with -Wmissing-declarations. Note that this won't be necessary for 'normal' dynamic shared objects, as those usually already declare their symbols in a header file.
2020-07-07Demos: Print out ELF Auxiliary Vector in LinkDemoAndrew Kaster
This is a test program anyway, so let's double check that the auxv is done properly here.
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-02-29LibELF: Use MAP_PRIVATE for file-backed mmaps in ELFDynamicLoaderAndrew Kaster
Clean up some unused code, clean up FIXMEs, and remove premature --dynamic-loader/-pie from LinkDemo (so it runs again on master)
2020-02-10AK: Remove bitrotted Traits::dump() mechanismAndreas Kling
This was only used by HashTable::dump() which I used when doing the first HashTable implementation. Removing this allows us to also remove most includes of <AK/kstdio.h>.
2020-02-02Meta: Claim copyright on files added by meAndrew Kaster
Demos/DynamicLink, LibC/cxxabi.cpp, and LibELF/ELFDynamic*.[cpp/h]
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-13Demos: Compile LinkDemo as a PIE with interpreter /lib/lib-elf.soAndrew Kaster
2020-01-13Demos: Remove extra methods/globals from DynamicLibAndrew Kaster
2020-01-02Demos: DynamicLink makefile now respects $(QUIET)Andrew Kaster
At a later date we'll probably want a template for SHLIB_OBJS and SHLIB or some such, but for now at least the library demo isn't printing compile commands all over the user's terminal.
2020-01-01Demos: Link our normal startfiles into the dynamic lib demoAndrew Kaster
Now that gcc knows about crtbeginS and crtendS, and knows not to link crt0.o into shared objects, we can get rid of the hacks required due to --nostartfiles.
2020-01-01Build: Demos/DynamicLink: use EXTRA_CLEANjoshua stein
2020-01-01Demos: Add a dynamic linking demo to show off dlfcn methodsAndrew Kaster
The LinkDemo program calls dlopen/dlsym/dlclose to try and load a dyanmic library from /usr/lib. It read a global variable and calls a global function (extern "C" of course :) ). There a few hacks left in the LinkLib dynamic library, however. In order to get the linker to stop complaining, we have to use -nostartfiles -ffreestanding otherwise it will link crt0.o to our shared object, which is definitely not right as the _init function for a main program (that calls main) is not suitable for our lib