This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: ld.so changes


Jakub Jelinek <jakub@redhat.com> writes:

> I did all I found.

Thanks, I've applied it.  Although it conflicted with some of the
changes I've made.  I applied it by hand.  Which helped finding a few
bugs and also helped updating the copyright year.  Please don't forget
to update it.  Use Roland's upd-copyr.el if you use emacs.

> Few problems:
> a) _dl_correct_cache_id and _dl_hwcap_mask need to be initialized.
>    Do you prefer to initialize them in rtld.c using
>    _rtld_global = { ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,
> 		    .dl_hwcap_mask = HWCAP_IMPORTANT };
>    ?

Well, I tried to avoid using initialization.  But on second thought it
makes no difference.  The memory has to be allocated anyway and all
fits in one page (at least on platforms where the data is cleaned up).

So I've added the initializers.

>    Such initialization is commented out with //X (like you did already
>    once).

The //X markers are left-overs.  If you see them delete them.

> b) Many ports did weak_extern(_dl_rtld_map); if (map == &_dl_rtld_map)
>    etc. (or similarly with _dl_hwcap). I've replaced these
>    with #ifndef SHARED weak_extern(_dl_rtld_map) #endif if (map == &GL(dl_rtld_map))
>    Is that correct or does dynamic libc need those references weak as well
>    (I think ld.so is dynamically linked in when static executable does
>    nss lookups)

That's fine.

> c) Are all the variables from _rtld_global defined somewhere #ifndef SHARED?

If they are used outside SHARED code they are defined in dl-support.c.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]