Thanks Ulrich — v2 fully reverts 533f04079c7 as you suggested, so ppc64 uses default_gcc_target_options.

BR,
Abhay
On 28/07/26 15:54, Ulrich Weigand wrote:
Abhay Kandpal <abhay@linux.ibm.com> wrote:

The cause is the code model used to compile the injected object.
Commit 533f04079c7 ("[gdb] [rs6000] Add
ppc64_linux_gcc_target_options method.") made ppc64 return an empty
string from gdbarch_gcc_target_options, overriding the
"-mcmodel=large" that default_gcc_target_options supplies for 64-bit
targets, so GCC falls back to -mcmodel=medium.
I can see why large model is more appropriate for this type
of compilation.  However, your patch just reverts the effect
of the above commit, without actually reverting it.  (This
causes ppc64_linux_gcc_target_options to pretty much duplicate
default_gcc_target_options.)  I think it would be preferable
to fully revert the commit instead.

Bye,
Ulrich