[FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly
Martin Storsjö
martin at martin.st
Thu Aug 4 14:20:16 EEST 2022
On Wed, 27 Jul 2022, Thomas Guillem wrote:
> DECLARE_ALIGNED, DECLARE_ASM_ALIGNED, and DECLARE_ASM_CONST will include
> attribute_visibility_hidden.
Hmm, I'm not entirely sure that we should do that - if we should add such
extra meaning to those macros.
How many symbols would it need to be applied on, if we don't apply it via
these macros?
I was a bit concerned that DECLARE_ALIGNED could be used for e.g. stack
local variables (where visibility doesn't make sense) - but we do have
LOCAL_ALIGNED_* macros for that instead, so maybe it could work this way
after all?
Do note, that these are currently defined in libavutil/mem.h, but after
the next major bump they'll be in libavutil/mem_internal.h. Currently
their contents are duplicated in the both, so any changes would need to
apply to both.
I see that libavutil/mem.h (which is a public installed header) doesn't
explicitly include libavutil/internal.h, so if someone uses those macros
without including libavutil/internal.h, attribute_visibility_hidden would
be undefined.
After the next bump, when these macros are entirely internal, this issue
is much clearer (and at that point, I think it could be a bit more
tolerable to extend their meaning to include visibility).
// Martin
More information about the ffmpeg-devel
mailing list