Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
This is a test program anyway, so let's double check that the auxv
is done properly here.
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
Clean up some unused code, clean up FIXMEs, and remove premature
--dynamic-loader/-pie from LinkDemo (so it runs again on master)
|
|
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>.
|
|
Demos/DynamicLink, LibC/cxxabi.cpp, and LibELF/ELFDynamic*.[cpp/h]
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
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
|