[email protected] writes:

> From: "Edgar E. Iglesias" <[email protected]>
>
> to describe symbols with a GOT entry but without PLT
> entry.
>
> Signed-off-by: Edgar E. Iglesias <[email protected]>
> ---
>  library.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/library.h b/library.h
> index f207502..d764da9 100644
> --- a/library.h
> +++ b/library.h
> @@ -31,6 +31,7 @@ struct library;
>  
>  enum toplt {
>       LS_TOPLT_NONE = 0,      /* PLT not used for this symbol. */
> +     LS_TOPLT_GOTONLY,       /* Has a GOT entry but no PLT.  */
>       LS_TOPLT_EXEC,          /* PLT for this symbol is executable. */
>  };

This is fine for now, but consider the following.

I see you use that value to decide whether to enable the PLT entry right
away, or wait for a bit.  I have a patch sketched, for support of -l.
For -l, we need to keep around "latent" PLT entries: those that nobody
requested directly (via -e), but that we keep around (disabled) in case
a library is mapped matching the -l criterion.  If that happens, some of
those latent entries may be enabled.

This seems to fit your bill.  In arch_library_symbol_init, you would
mark those symbols as latent (and sym->arch.gotonly = 1 or some such, so
that you can tell them from the rest).  Later, in arch_dynlink_done, you
loop through libraries like you do now, looking for gotonly symbols, and
enabling them.

Thanks,
PM

_______________________________________________
Ltrace-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel

Reply via email to