bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to f


From: jason.vas.dias at gmail dot com
Subject: [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"
Date: Sun, 05 Jun 2022 15:50:23 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29226

--- Comment #6 from Jason Vas Dias <jason.vas.dias at gmail dot com> ---
OK, now the error message printing code looks like this:

    {
      if (!object->has_no_split_stack())
      { unsigned char ib[16]={0};
        if ( view )
        { ib[0] = *(((unsigned char*)view) + fnoffset);
          ib[1] = *(((unsigned char*)view) + fnoffset + 1);
          ib[2] = *(((unsigned char*)view) + fnoffset + 2);
          ib[3] = *(((unsigned char*)view) + fnoffset + 3);
        }
        object->error(_("failed to match split-stack sequence at "
                        "section %u offset %0zx r10:%c r11:%c %u
%2.2hhx.%2.2hhx.%2.2hhx.%2.2hhx"),
                      shndx, static_cast<size_t>(fnoffset)
                      , (this->match_view(view, view_size, fnoffset,
                                          lea_r10_insn, lea_r10_insn_len
                                         ) ? '1' : '0'
                        )
                      , (this->match_view(view, view_size, fnoffset,
                                          lea_r11_insn, lea_r11_insn_len
                                         ) ? '1' : '0'
                        )
                      , static_cast<uint32_t>(fnsize)
                      , ib[0], ib[1], ib[2], ib[3]
                     );
      }
      return;


So we will see what instruction is actually at 'view + fnoffset' in
gcc 12's libgcc_eh.a :

/usr/local/bin/ld: Unlocking file
"/home/jvd/rpmbuild/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/./gcc/libgcc.a"
/usr/local/bin/ld: Closed descriptor 5 for
"/home/jvd/rpmbuild/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/./gcc/libgcc_eh.a"
/usr/local/bin/ld: Opened new descriptor 4 for "cgo"
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 540 r10:0 r11:0 115 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 660 r10:0 r11:0 93 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 7e0 r10:0 r11:0 204 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 8b0 r10:0 r11:0 191 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 970 r10:0 r11:0 177 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset a30 r10:0 r11:0 369 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset bb0 r10:0 r11:0 161 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset c60 r10:0 r11:0 118 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset ce0 r10:0 r11:0 132 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset d70 r10:0 r11:0 135 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset ec0 r10:0 r11:0 2625 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1910 r10:0 r11:0 240 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1a00 r10:0 r11:0 240 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1af0 r10:0 r11:0 102 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1c70 r10:0 r11:0 218 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1d50 r10:0 r11:0 395 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 1ee0 r10:0 r11:0 277 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 2390 r10:0 r11:0 3519 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3150 r10:0 r11:0 263 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3260 r10:0 r11:0 204 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3330 r10:0 r11:0 282 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3450 r10:0 r11:0 296 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3580 r10:0 r11:0 68 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 35d0 r10:0 r11:0 428 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 39f0 r10:0 r11:0 228 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 3b70 r10:0 r11:0 1496 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 4150 r10:0 r11:0 1421 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 4780 r10:0 r11:0 4649 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 59b0 r10:0 r11:0 304 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 5b90 r10:0 r11:0 1194 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 6040 r10:0 r11:0 469 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 6220 r10:0 r11:0 401 f3.0f.1e.fa
/usr/local/bin/ld: error: /tmp/ccGv8QZX.o: failed to match split-stack sequence
at section 265 offset 6480 r10:0 r11:0 1505 f3.0f.1e.fa
...

Aha, so the instruction that causes the problem is (in hex) 'f3.0f.1e.fa' ?

I will look this up in my Intel SDM .

Maybe ld should make an exception for this sequence ? it always
appears to be the same in every occurrence of this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]