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 background on code models. > >

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

2025-03-12 Thread Martin Storsjö
On Wed, 12 Mar 2025, Andreas Rheinhardt wrote: Martin Storsjö: On Wed, 12 Mar 2025, Andreas Rheinhardt wrote: Pranav Kant via ffmpeg-devel: + * all globals in a data section that's unreachable with PC relative instructions + * (small code model instruction sequence). We mark all such globals

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

2025-03-12 Thread Martin Storsjö
On Wed, 12 Mar 2025, Andreas Rheinhardt 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 background on code models. For PIC (Position independent code), this is fine as long as binary is small but as bi

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

2025-03-12 Thread Andreas Rheinhardt
Martin Storsjö: > On Wed, 12 Mar 2025, Andreas Rheinhardt 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 background on code models. >>> For PIC (Position independent code), this is fine as l

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

2025-03-11 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

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

[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