On Wed, Nov 03, 2021 at 05:28:02PM +0100, Florian Weimer wrote: > --- /dev/null > +++ b/bits/dlfcn_eh_frame.h > @@ -0,0 +1,33 @@ > +/* System dependent definitions for find unwind information using ld.so. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + <https://www.gnu.org/licenses/>. */ > + > +#ifndef _DLFCN_H > +# error "Never use <bits/dlfcn_eh_frame.h> directly; include <dlfcn.h> > instead." > +#endif > + > +/* This implementation does not use a DBASE pointer argument in > + _dl_find_eh_frame. */ > +#define DL_FIND_EH_FRAME_DBASE 0 > + > +__BEGIN_DECLS > +/* If PC points into an object that has a PT_GNU_EH_FRAME segment, > + return the pointer to the start of that segment in memory. If no > + corresponding object exists or the object has no such segment, > + returns NULL. */ > +void *_dl_find_eh_frame (void *__pc) __THROW; > +__END_DECLS
dl_iterate_phdr is declared in link.h and without the _ prefix, shouldn't dl_find_eh_frame follow the suit and be declared in the same header and also without the prefix? Also, shouldn't the DL_FIND_EH_FRAME_DBASE macro on the other side have __ prefix? We have one DL_* macro, DL_CALL_FCT, so perhaps it is fine for -D_GNU_SOURCE, but various other projects do use macros with DL_* prefix, like boost or python. Jakub