Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 760051

Summary: compiling broken on arch/x86/kernel/entry_64.S
Product: Red Hat Enterprise Linux 6 Reporter: colyli
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: imammedo
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-05 11:58:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description colyli 2011-12-05 11:24:40 UTC
Description of problem:
code error in arch/x86/kernel/entry_64.S, when I compile kernel code on ubuntu 12.04, gcc complains an error:
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  AS      arch/x86/kernel/entry_64.o
/tmp/cc9K85uN.s: Assembler messages:
/tmp/cc9K85uN.s: Error: .size expression for do_hypervisor_callback does not evaluate to a constant
make[2]: *** [arch/x86/kernel/entry_64.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2


Version-Release number of selected component (if applicable):
rhel6 2.6.32-131.21.1

How reproducible:
see the code from 2.6.32-131.21.1:

1270 #ifdef CONFIG_XEN
1271 zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
1272 
1273 /*
1274  * A note on the "critical region" in our callback handler.
1275  * We want to avoid stacking callback handlers due to events occurring
1276  * during handling of the last event. To do this, we keep events disabled
1277  * until we've done all processing. HOWEVER, we must enable events before
1278  * popping the stack frame (can't be done atomically) and so it would still
1279  * be possible to get enough handler activations to overflow the stack.
1280  * Although unlikely, bugs of that kind are hard to track down, so we'd
1281  * like to avoid the possibility.
1282  * So, on entry to the handler we detect whether we interrupted an
1283  * existing activation in its critical region -- if so, we pop the current
1284  * activation and restart the handler using the previous one.
1285  */
1286 ENTRY(xen_do_hypervisor_callback)   # do_hypervisor_callback(struct *pt_regs)
1287         CFI_STARTPROC
1288 /*
1289  * Since we don't modify %rdi, evtchn_do_upall(struct *pt_regs) will
1290  * see the correct pointer to the pt_regs
1291  */
1292         movq %rdi, %rsp            # we don't return, adjust the stack frame
1293         CFI_ENDPROC
1294         DEFAULT_FRAME
1295 11:     incl PER_CPU_VAR(irq_count)
1296         movq %rsp,%rbp
1297         CFI_DEF_CFA_REGISTER rbp
1298         cmovzq PER_CPU_VAR(irq_stack_ptr),%rsp
1299         pushq %rbp                      # backlink for old unwinder
1300         call xen_evtchn_do_upcall
1301         popq %rsp
1302         CFI_DEF_CFA_REGISTER rsp
1303         decl PER_CPU_VAR(irq_count)
1304         jmp  error_exit
1305         CFI_ENDPROC
1306 END(do_hypervisor_callback)

there is a typo on line 1306, do_hypervisor_callback should be xen_do_hypervisor_callback.

Additional info:
1) after fix the typo, gcc does not complain the error.
2) gcc version:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.2-5ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.2 (Ubuntu/Linaro 4.6.2-5ubuntu1)

Comment 2 Igor Mammedov 2011-12-05 11:58:30 UTC

*** This bug has been marked as a duplicate of bug 720982 ***