[PATCH v2] elf: Add _dl_find_object function

Jakub Jelinek jakub@redhat.com
Fri Nov 26 15:46:11 GMT 2021


On Thu, Nov 25, 2021 at 09:35:14PM +0100, Florian Weimer wrote:
> +struct dl_find_object
> +{
> +  unsigned long long int dlfo_flags;	/* Currently 0. */
> +  void *dlfo_map_start;		/* Beginning of mapping containing address.  */
> +  void *dlfo_map_end;		/* End of mapping.  */
> +  struct link_map *dlfo_link_map;
> +  void *dlfo_eh_frame;		/* Exception handling data of the object.  */
> +# if DLFO_STRUCT_HAS_EH_DBASE
> +  void *dlfo_eh_dbase;		/* Base address for DW_EH_PE_datarel.  */
> +# endif
> +# if DLFO_STRUCT_HAS_EH_COUNT
> +  int dlfo_eh_count;		/* Number of exception handling entries.  */
> +# endif
> +};

I must say I still don't really like these conditionally included
fields, if in the future one needs some of them on some other architecture,
we'd need to add another API or symbol version it etc.
Couldn't whether those fields should be filled with some special values
or if just 0 should be stored there be determined by some non-exported
internal macros and just store 0 otherwise?

	Jakub



More information about the Gcc-patches mailing list