title: main.c.o uses VFP register arguments, a.out does not
body: <p>I have a main.c that is being compiled like so:</p>
  <pre><code>arm-none-eabi-gcc -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -o CMakeFiles/lab1.elf.dir/main.c.o -c main.c
  </code></pre>
  <p>The output of <code>readelf -A main.c.o</code>:</p>
  <pre><code>Attribute Section: aeabi
  File Attributes
    Tag_CPU_name: &quot;7-A&quot;
    Tag_CPU_arch: v7
    Tag_CPU_arch_profile: Application
    Tag_ARM_ISA_use: Yes
    Tag_THUMB_ISA_use: Thumb-2
    Tag_FP_arch: VFPv3
    Tag_ABI_PCS_wchar_t: 4
    Tag_ABI_FP_denormal: Needed
    Tag_ABI_FP_exceptions: Needed
    Tag_ABI_FP_number_model: IEEE 754
    Tag_ABI_align_needed: 8-byte
    Tag_ABI_align_preserved: 8-byte, except leaf SP
    Tag_ABI_enum_size: small
    Tag_ABI_VFP_args: VFP registers
    Tag_ABI_optimization_goals: Aggressive Debug
    Tag_CPU_unaligned_access: v6
    Tag_MPextension_use: Allowed
    Tag_Virtualization_use: TrustZone 
  </code></pre>
  <p>I then want to link this file with some other libraries I have (these are C++ libraries so I am using the g++ linker).  I keep getting an error that the executable isn't using VFP arguments, despite the command line options to enable them:</p>
  <pre><code>arm-none-eabi-g++ -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard  CMakeFiles/lab1.elf.dir/main.c.o
  </code></pre>
  <p>This is the output:</p>
  <p>(Yes, there are lots of other issues with missing libraries, etc, but I'm trying to reduce this down to a simple example).</p>
  <p>(Also, this worked fine in GCC 6.3.1, it's only broken now that I'm trying in 9.2.1)</p>
  <pre><code>/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: error: CMakeFiles/lab1.elf.dir/main.c.o uses VFP register arguments, a.out does not
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file CMakeFiles/lab1.elf.dir/main.c.o
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: CMakeFiles/lab1.elf.dir/main.c.o: in function `main':
  main.c:(.text+0x8): undefined reference to `display_init'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: main.c:(.text+0x10): undefined reference to `display_fillScreen'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: main.c:(.text+0x1c): undefined reference to `display_setCursor'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: main.c:(.text+0x24): undefined reference to `display_setTextColor'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: main.c:(.text+0x2c): undefined reference to `display_setTextSize'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: main.c:(.text+0x38): undefined reference to `display_println'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:64: undefined reference to `_exit'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function `_write_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:49: undefined reference to `_write'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function `_close_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:47: undefined reference to `_close'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function `_fstat_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:55: undefined reference to `_fstat'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function `_isatty_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:52: undefined reference to `_isatty'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function `_lseek_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:49: undefined reference to `_lseek'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function `_read_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/readr.c:49: undefined reference to `_read'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): in function `abort':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/abort.c:59: undefined reference to `_exit'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_kill_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:53: undefined reference to `_kill'
  /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_getpid_r':
  /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:83: undefined reference to `_getpid'
  collect2: error: ld returned 1 exit status
  </code></pre>