cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.08k stars 4.29k forks source link

[GCC13] warning: missing .note.GNU-stack section implies executable stack #44609

Open iarspider opened 6 months ago

iarspider commented 6 months ago

In GCC13 IBs, the following warnings are emitted by linker:

...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/SiPixelDigiSoA/test/DigiErrors_testROCmAsync/DigiErrors_test.cc-15ae26.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/SiPixelClusterSoA/test/Clusters_testROCmAsync/Clusters_test.cc-a8ff6a.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/SiPixelDigiSoA/test/Digis_testROCmAsync/Digis_test.cc-d61b15.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/SoATemplate/test/testRocmSoALayoutAndView_t/SoALayoutAndView_t.hip.cc-71aaed.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/TrackSoA/test/TrackSoAHeterogeneousAlpaka_testROCmAsync/TrackSoAHeterogeneous_test.cc-9b294d.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/VertexSoA/test/ZVertexSoA_testROCmAsync/ZVertexSoA_test.cc-557c25.o: missing .note.GNU-stack section implies executable stack
...bin/ld.bfd: warning: tmp/el9_amd64_gcc13/src/DataFormats/TrackingRecHitSoA/test/Hits_testROCmAsync/Hits_test.cc-ecb39b.o: missing .note.GNU-stack section implies executable stack

There is an article explaining what this warning means. According to it, passing -z no-exec-stack to the linker should fix the warning, but it will break (assembly) code that expects executable stack.

cmsbuild commented 6 months ago

cms-bot internal usage

cmsbuild commented 6 months ago

A new Issue was created by @iarspider.

@antoniovilela, @smuzaffar, @makortel, @rappoccio, @sextonkennedy, @Dr15Jones can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

iarspider commented 6 months ago

assign core,heterogeneous

cmsbuild commented 6 months ago

New categories assigned: core,heterogeneous

@Dr15Jones,@fwyzard,@makortel,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

fwyzard commented 6 months ago

The same warnings are there also with GCC 12 (I don't remember about GCC 11).

fwyzard commented 6 months ago

A patch was submitted to the ROCm software last year, and integrated in December: https://github.com/ROCm/clr/issues/22 .

Let's wait and see if the upcoming ROCm 6.1 fixes the warnings ? Otherwise we could try and rebuild the ROCm stack from its sources - but I haven't tried to do it, yet.