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

            Bug ID: 86064
           Summary: [8 Regression] compiling Linux kernel: Error: can't
                    resolve `.text.unlikely' {.text.unlikely section} -
                    `.LVL43x' {.text section}
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alex_y_xu at yahoo dot ca
  Target Milestone: ---

description:

compiling Linux kernel fails with gcc 8.1. I think gcc 7.3.1-20180406 works.

steps to reproduce:

gcc -fno-var-tracking-assignments -gsplit-dwarf -O2 -c -o /dev/null -c common.i

flags trimmed from full compile line. file preprocessed from
linux-4.17/arch/x86/kernel/cpu/common.c.

expected result:

objcopy: Warning: '/dev/null' is not an ordinary file

actual result:

Assembler messages:
Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL436'
{.text section}
Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL437'
{.text section}

additional information:

-O1 compiles with no errors. -O0 produces the following (trimmed):

./arch/x86/include/asm/cpufeature.h: In function ‘syscall_init’:
./arch/x86/include/asm/cpufeature.h:164:7: warning: asm operand 0 probably
doesn’t match constraints
  asm_volatile_goto("1: jmp 6f\n"
       ^~~
./arch/x86/include/asm/cpufeature.h:164:7: warning: asm operand 2 probably
doesn’t match constraints
./arch/x86/include/asm/cpufeature.h:164:7: error: impossible constraint in
‘asm’

you can find the contents of cpufeature.h in the Linux source code.

.config available on request.

Reply via email to