Age | Commit message (Collapse) | Author |
|
|
|
|
|
- This symbol library is still special in that symbols are created on
demand and never actually added. It just serves as a link to
protolibrary with system call prototypes, and has a name (SYS).
- Prototypes for system calls were moved to a dedicated prototype
library called syscalls.conf.
- Because it's undesirable to look up syscall prototypes in anything
but the dedicated syscall protolib, prototype.c/.h now understand
that some lookups shouldn't be done recursively (and so we never
pick the definition from -F file that just happens to have the same
name as a system call). The good thing is that now libraries can
actually use symbols named SYS_something without clashing with
system call prototypes.
- One test case needed to be updated, because we now display system
calls as something@SYS instead of SYS_something.
|
|
- This then trickles to library_init, which needs to return int
- Callers of library_init were updated to unroll their transactions
upon failure
- PPC and ARM backends were updated to match the updated interface
|
|
This is enough for handling -x symbols. For handling -e however, we will
need a per-process library that's incrementally built according to what's
mapped in.
|
|
It's now a bit more strongly typed, can grow and shrink on demand, and has
a more complete interface.
It uses open addressing scheme to store hashes.
|
|
This is for consistency with other structures, and ultimately with
Linux coding style. The typedef ("Process") was dropped as well for
this reason.
This opportunity was used to fix coding style around the impacted
lines.
|
|
|
|
|
|
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
|
|
Those don't need to be full symbols, so we keep them separately.
|
|
|
|
|
|
Neither latent, nor delayed symbols are given a breakpoint. The difference
is in who's responsible for the state. Latent symbols are (will be) used
by ltrace core. Delayed symbols are used by backends. Only when both of
these flags are cleared is a breakpoint enabled for the symbol.
|
|
to describe symbols with a GOT entry but without PLT
entry.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
|
|
Document the interface, refer to this documentation at declarations of
each_* functions.
|
|
Note that the placement under arch.h is currently conceptual only. Since
no backend defines ARCH_HAVE_ADDRESS_TYPES, it's actually in sysdep.h in
all cases.
|
|
The former is called when ltelf is available. The latter in dynamic context
when ltelf is not necessary anymore (or if the data is necessary, it will
have been copied out to struct library).
|
|
|
|
|
|
|
|
If any other architecture needs it, we'll add it back in some form. But
now that we have callbacks on breakpoints, it might be possible to do it
differently, without explicit support.
|
|
The theory behing fixed_libs was broken from the beginning, we can't tell
dlopened libraries from fixed ones when attaching. We also don't need to
wait for _start to enable breakpoints. We may need this on LS_TOPLT_POINT
architectures, but that was added for PPC, and PPC doesn't need it anymore.
|
|
- ... not int, which is narrower than target_address_t on 64-bit machines
|
|
|
|
- instead of creating them, keeping them around, and then just not enabling
breakpoints for them
|
|
- that because base is unknown at the time that library is mapped in, only
bias is known. We'd have to read the elf file to determine whether this
is the right library or not. Instead we assume that the dynamic linker
keeps linked list, and use address of internal structure as the key
|
|
- the default might become "*" in future, but keep things more or less
the same as they always were for now
|
|
|
|
- new configuration setting ARCH_HAVE_LIBRARY_SYMBOL_DATA
|
|
|
|
|
|
|
|
- and drop opd2addr, which this function supersedes
|
|
... now the restarts are supported by start_after instead of start.
Otherwise the restart scenario was something like:
for (it *sym = NULL; (sym = next(sym)) != NULL; )
if ((sym = sym->next) == NULL)
break;
which just seems too convoluted.
|
|
|
|
- syscall support very hacky right now
|
|
- the patch will be sliced later
|