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.
Description of problem:
SLOF is always built as a big endian target. To be built on a little endian host, SLOF makefile adds "-m64 -mbig" to gcc flags.
But the build fails on the link edition:
====== Building slof ======
make -C slof BOARD=qemu PLATFORM= FLAG="-DRTAS_NVRAM -DBROKEN_SC1 -DDHCPARCH=0x0C " TARG=ppc64 RELEASE=-DRELEASE=\"\\\"git-749c50b84b83a9b9\\\"\"
make[2]: Entering directory `/home/lvivier/SLOF/board-qemu/slof'
gcc -m64 -mbig -mabi=elfv1 -T/home/lvivier/SLOF/slof/OF.lds /home/lvivier/SLOF/slof/ofw.o version.o paflof.o helpers.o allocator.o \
/home/lvivier/SLOF/slof/entry.o romfs.o OF.o nvramlog.o /home/lvivier/SLOF/board-qemu/llfw/board_io.o \
/home/lvivier/SLOF/board-qemu/llfw/io_generic_lib.o -static -nostdlib -Wl,-q,-n /home/lvivier/SLOF/lib/libbootmsg.a /home/lvivier/SLOF/lib/libelf.a /home/lvivier/SLOF/lib/libhvcall.a /home/lvivier/SLOF/lib/libvirtio.a /home/lvivier/SLOF/lib/libusb.a /home/lvivier/SLOF/lib/libnvram.a /home/lvivier/SLOF/lib/libveth.a /home/lvivier/SLOF/lib/libe1k.a /home/lvivier/SLOF/lib/libc.a -o paflof
/home/lvivier/SLOF/slof/ofw.o:(.slof.loader+0x5c): undefined reference to `.patch_broken_sc1'
$ file /home/lvivier/SLOF/slof/ofw.o
/home/lvivier/SLOF/slof/ofw.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped
patch_broken_sc1 is in libhvcall:
$ nm lib/libhvcall/brokensc1.o|grep patch
0000000000000000 D patch_broken_sc1
$ file lib/libhvcall/brokensc1.o
lib/libhvcall/brokensc1.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped
Version-Release number of selected component (if applicable):
gcc-4.8.5-4.el7.ppc64le
binutils-2.23.52.0.1-55.el7.ppc64le
How reproducible:
100%
Steps to Reproduce:
1. git clone git://git.qemu-project.org/SLOF.git
2. cd SLOF
3. make V=2 qemu
Actual results:
Error: undefined reference to `.patch_broken_sc1'
Expected results:
Build slof without error.
Additional info:
It seems that "gcc" adds "--oformat elf32-powerpc" in case of "-mbig" even if the target is 64bit:
*link_target:
%{mlittle|mlittle-endian:;mbig|mbig-endian: --oformat elf32-powerpc;mcall-i960-old:;:}
If we remove the "-mbig" from the command line, all works fine as ld will use for output format the same as the input format (elf64-powerpc).
This can be related to BZ1279172, and this patch should fix this one too:
https://bugzilla.redhat.com/attachment.cgi?id=1091247
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2433.html
Description of problem: SLOF is always built as a big endian target. To be built on a little endian host, SLOF makefile adds "-m64 -mbig" to gcc flags. But the build fails on the link edition: ====== Building slof ====== make -C slof BOARD=qemu PLATFORM= FLAG="-DRTAS_NVRAM -DBROKEN_SC1 -DDHCPARCH=0x0C " TARG=ppc64 RELEASE=-DRELEASE=\"\\\"git-749c50b84b83a9b9\\\"\" make[2]: Entering directory `/home/lvivier/SLOF/board-qemu/slof' gcc -m64 -mbig -mabi=elfv1 -T/home/lvivier/SLOF/slof/OF.lds /home/lvivier/SLOF/slof/ofw.o version.o paflof.o helpers.o allocator.o \ /home/lvivier/SLOF/slof/entry.o romfs.o OF.o nvramlog.o /home/lvivier/SLOF/board-qemu/llfw/board_io.o \ /home/lvivier/SLOF/board-qemu/llfw/io_generic_lib.o -static -nostdlib -Wl,-q,-n /home/lvivier/SLOF/lib/libbootmsg.a /home/lvivier/SLOF/lib/libelf.a /home/lvivier/SLOF/lib/libhvcall.a /home/lvivier/SLOF/lib/libvirtio.a /home/lvivier/SLOF/lib/libusb.a /home/lvivier/SLOF/lib/libnvram.a /home/lvivier/SLOF/lib/libveth.a /home/lvivier/SLOF/lib/libe1k.a /home/lvivier/SLOF/lib/libc.a -o paflof /home/lvivier/SLOF/slof/ofw.o:(.slof.loader+0x5c): undefined reference to `.patch_broken_sc1' $ file /home/lvivier/SLOF/slof/ofw.o /home/lvivier/SLOF/slof/ofw.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped patch_broken_sc1 is in libhvcall: $ nm lib/libhvcall/brokensc1.o|grep patch 0000000000000000 D patch_broken_sc1 $ file lib/libhvcall/brokensc1.o lib/libhvcall/brokensc1.o: ELF 64-bit MSB relocatable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped Version-Release number of selected component (if applicable): gcc-4.8.5-4.el7.ppc64le binutils-2.23.52.0.1-55.el7.ppc64le How reproducible: 100% Steps to Reproduce: 1. git clone git://git.qemu-project.org/SLOF.git 2. cd SLOF 3. make V=2 qemu Actual results: Error: undefined reference to `.patch_broken_sc1' Expected results: Build slof without error. Additional info: It seems that "gcc" adds "--oformat elf32-powerpc" in case of "-mbig" even if the target is 64bit: *link_target: %{mlittle|mlittle-endian:;mbig|mbig-endian: --oformat elf32-powerpc;mcall-i960-old:;:} If we remove the "-mbig" from the command line, all works fine as ld will use for output format the same as the input format (elf64-powerpc). This can be related to BZ1279172, and this patch should fix this one too: https://bugzilla.redhat.com/attachment.cgi?id=1091247