Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-03-06 Thread Pranav Kant via ffmpeg-devel
I think you were looking at an older version of the patch. Newer version didn't have this. Anyhow, there's a new version I uploaded (v3). On Thu, Feb 27, 2025 at 6:31 PM Lynne wrote: > On 25/02/2025 22:37, Pranav Kant via ffmpeg-devel wrote: > > By default, all globals in C/C++ compiled by clang

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-03-06 Thread Pranav Kant via ffmpeg-devel
I uploaded a new patch (v3) that addresses these concerns. On Thu, Feb 27, 2025 at 5:14 PM Michael Niedermayer wrote: > On Wed, Feb 26, 2025 at 07:44:37PM +, Pranav Kant via ffmpeg-devel > wrote: > > By default, all globals in C/C++ compiled by clang are allocated > > in non-large data secti

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-02-27 Thread Lynne
On 25/02/2025 22:37, Pranav Kant via ffmpeg-devel wrote: By default, all globals in C/C++ compiled by clang are allocated in non-large data sections. See [1] for background on code models. For PIC (Position independent code), this is fine as long as binary is small but as binary size increases, u

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-02-27 Thread Michael Niedermayer
On Wed, Feb 26, 2025 at 07:44:37PM +, Pranav Kant via ffmpeg-devel wrote: > By default, all globals in C/C++ compiled by clang are allocated > in non-large data sections. See [1] for background on code models. > For PIC (Position independent code), this is fine as long as binary is > small but

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-02-26 Thread James Zern via ffmpeg-devel
On Wed, Feb 26, 2025 at 11:44 AM Pranav Kant via ffmpeg-devel wrote: > > [...] > --- a/libavutil/attributes_internal.h > +++ b/libavutil/attributes_internal.h > @@ -31,4 +31,19 @@ > #define FF_VISIBILITY_POP_HIDDEN > #endif > > +/** > + * Some globals defined in C files are used from hardcod

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-02-26 Thread Pranav Kant via ffmpeg-devel
I added it to attributes_internal.h. The existing attribute in attributes_internal.h (attribute_visibility_hidden) is also being used with DECLARE_ALIGNED macros (see libavcodec/sbrdsp_template.c). My new macro is similar in nature. On Wed, Feb 26, 2025 at 11:44 AM Pranav Kant wrote: > By defaul

Re: [FFmpeg-devel] [PATCH] Mark C globals with small code model

2025-02-25 Thread Andreas Rheinhardt
Pranav Kant via ffmpeg-devel: > By default, all globals in C/C++ compiled by clang are allocated > in non-large data sections. See [1] for background on code models. > For PIC (Position independent code), this is fine as long as binary is > small but as binary size increases, users maybe want to us