https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86490

joe.harvell at netscout dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joe.harvell at netscout dot com

--- Comment #15 from joe.harvell at netscout dot com ---
I get the following error on on gcc 8.3.0 using the default bfd linker with
LTO, but only with binutils 2.27 and 2.34.  This error does not occur with
binutils 2.25.  I also get this error with gcc 10.1.0 and binutils 2.34. (It's
not possible to build gcc 10.1.0 correctly with binutils 2.25, so this is not
tested).  In all cases, there is no error when using the gold linker.

lto1: fatal error: multiple prevailing defs for ‘actual_function_name_redacted’

This function is defined in one .c file and declared with the extern keyword in
another .c file.

For the gcc 10.1.0 / binutils 2.34 case, here is what I see using lto-dump:

jharvell@grays obj$ /opt/gcc10.1/bin/lto-dump
-symbol=actual_function_name_redacted actual_c_filename_redacted_v1.o 
Symbol: actual_function_name_redacted
actual_function_name_redacted/259 (actual_function_name_redacted)
@0x7fedffb7c168
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Read from file: actual_c_filename_redacted_v1.o
  Availability: available
  Unit id: 1
  Function flags: count:1073741824 (estimated locally)
  Called by: 
  Calls: memcpy/260 (354334800 (estimated locally),0.33 per call) 

jharvell@grays obj$ /opt/gcc10.1/bin/lto-dump
-symbol=actual_function_name_redacted actual_c_filename_redacted.o 
Symbol: actual_function_name_redacted

Reply via email to