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

2025-02-26 Thread 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 use medium/large code models (-mcmodel=m

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

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

2025-02-25 Thread 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 use medium/large code models (-mcmodel=m

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

2025-03-03 Thread 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 use medium/large code models (-mcmodel=m

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 i

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 +0000, Pranav Kant via ffmpeg-devel > wrote: > > By default, all globals in C/C++ compiled by clang are allocated > >

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

2025-03-11 Thread 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 use medium/large code models (-mcmodel=m

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

2025-03-11 Thread Pranav Kant via ffmpeg-devel
Patch version v4. - Rebased - Missing "(" in __attribute__((model("small)) in the earlier patch version. On Tue, Mar 11, 2025 at 12:17 PM Pranav Kant 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. > F

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

2025-03-13 Thread Pranav Kant via ffmpeg-devel
Thank you for taking a look. On Tue, Mar 11, 2025 at 4:45 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > 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 back

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

2025-03-20 Thread Pranav Kant via ffmpeg-devel
Patch version v5: - Uses two new macros DECLARE_ASM_VAR (used for both external and inline asm) and DECLARE_EXTERNAL_ASM_VAR (used only for external asm) - I intend to remove explicit existing use of attribute_visibility_hidden in follow-up patch and instead use DECLARE_EXTERNAL_ASM_VAR for those v

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

2025-04-05 Thread 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 use medium/large code models (-mcmodel=m

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

2025-04-04 Thread Pranav Kant via ffmpeg-devel
Any thoughts on this? On Thu, Mar 20, 2025 at 5:30 PM Pranav Kant wrote: > Patch version v5: > - Uses two new macros DECLARE_ASM_VAR (used for both external and inline > asm) and DECLARE_EXTERNAL_ASM_VAR (used only for external asm) > - I intend to remove explicit existing use of attribute_visib

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

2025-04-15 Thread Pranav Kant via ffmpeg-devel
Hello again. Is there anything else I can do here? On Fri, Apr 4, 2025 at 11:40 AM Pranav Kant wrote: > Any thoughts on this? > > On Thu, Mar 20, 2025 at 5:30 PM Pranav Kant wrote: > >> Patch version v5: >> - Uses two new macros DECLARE_ASM_VAR (used for both external and inline >> asm) and DEC

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

2025-04-28 Thread Pranav Kant via ffmpeg-devel
Ping. On Tue, Apr 15, 2025 at 4:22 PM Pranav Kant wrote: > Hello again. Is there anything else I can do here? > > On Fri, Apr 4, 2025 at 11:40 AM Pranav Kant wrote: > >> Any thoughts on this? >> >> On Thu, Mar 20, 2025 at 5:30 PM Pranav Kant wrote: >> >>> Patch version v5: >>> - Uses two new m