https://sourceware.org/bugzilla/show_bug.cgi?id=31956
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to H.J. Lu from comment #15) > (In reply to Sam James from comment #14) > > Sorry, one more question: richi's comment at > > https://sourceware.org/bugzilla/show_bug.cgi?id=24406#c10 made me wonder. > > > > If I modify https://sourceware.org/bugzilla/show_bug.cgi?id=31956#c6 to have > > noipa or noinline for buffer_write_file, the status is the same (just the > > hashes change): > > ``` > > --- a/tls_crypt_testdriver.res > > +++ b/tls_crypt_testdriver.res > > @@ -1,11 +1,11 @@ > > 3 > > tls_crypt_testdriver-tls_crypt_testdriver-test_tls_crypt.o 4 > > 194 [-648e684371714953-]{+cc01d97532c69e30+} PREVAILING_DEF > > __wrap_buffer_write_file > > 196 [-648e684371714953-]{+cc01d97532c69e30+} PREVAILING_DEF_IRONLY > > test_tls_crypt_v2_write_server_key_file > > 200 [-648e684371714953-]{+cc01d97532c69e30+} PREVAILING_DEF main > > 220 [-648e684371714953-]{+cc01d97532c69e30+} RESOLVED_IR write_pem_key_file > > tls_crypt_testdriver-tls_crypt_testdriver-buffer.o 1 > > 202 [-cdf5ef9747252c01-]{+a5f22943180ec17d+} PREVAILING_DEF_IRONLY > > buffer_write_file > > tls_crypt_testdriver-tls_crypt_testdriver-crypto.o 2 > > 204 [-a3abc8ef456eac42-]{+e3adb2154884903b+} PREVAILING_DEF_IRONLY > > write_pem_key_file > > 207 [-a3abc8ef456eac42-]{+e3adb2154884903b+} RESOLVED_IR buffer_write_file > > ``` > > > > should it be PREVAILING_DEF instead for buffer_write_file, not > > PREVAILING_DEF_IRONLY if I've forced a real definition? > > No, since there are non-IR references. If there are non-IR references, > PREVAILING_DEF will be generated. But the linker itself, via --wrap will create a reference to the symbol. With PREVAILING_DEF_IRONLY the compiler is free to elide the symbol, so IMO that's invalid even if the linkers reference will later be "internal". -- You are receiving this mail because: You are on the CC list for the bug.