bugGNU GRUB - Bugs: bug #47580, grub2: build for armv7a fails...


You are not allowed to post comments on this tracker with your current authentication level.

bug #47580: grub2: build for armv7a fails with: "build-grub-module-verifier: error: unsupported relocation 0x2b."

Submitted by:  Chen Qi <chenqi>
Submitted on:  Thu 31 Mar 2016 02:52:17 AM UTC  
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  Hardware-specific
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release: 
Release:  Git master Reproducibility:  Every Time
Planned Release:  2.03+

Thu 31 Mar 2016 04:37:24 PM UTC, comment #2:

Is -fPIC on gcc command line? If so it's gcc bug. A problem with this particular relocation is that AFAICT there is no way to translate them to PE relocations for arm-efi. I have their implementation for dl.c but it's no good if we can't solve PE problem

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 31 Mar 2016 04:28:53 PM UTC, comment #1:

That's not enough, you need to actually implement these relocations or find compiler options to disable them. Otherwise any code that contains them will fail at run time.

Andrei Borzenkov <arvidjaar>
Project Member
Thu 31 Mar 2016 02:52:17 AM UTC, original submission:

Building grub2 for armv7a arch would fail with the following errors.

| build-grub-module-verifier: error: unsupported relocation 0x2b.
| make[3]: *** [disk.mod] Error 1
| make[3]: *** Waiting for unfinished jobs....
| build-grub-module-verifier: error: unsupported relocation 0x2b.
| make[3]: *** [cat.mod] Error 1
| build-grub-module-verifier: error: unsupported relocation 0x2b.
| make[3]: *** [cmp.mod] Error 1

I'm using gcc 5.3 for cross compilation.
"arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=vfp -mfloat-abi=softfp ...."

I've looked at the codes of grub-module-verifier. The problem seems to be that the above relocation is not allowed for 'arm' arch. Add the relocations for arm arch would solve the build failure but I really don't know whether it's appropriate.

diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
index e217dcd..a249713 100644
--- a/util/grub-module-verifier.c
+++ b/util/grub-module-verifier.c
@@ -97,6 +97,8 @@ struct grub_module_verifier_arch archs[] = {

To summarise, is the above patch appropriate or armv7a is not yet supported?

Chen Qi <chenqi>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by chenqi (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    Sun 05 Mar 2017 08:18:34 PM UTC phcoder Planned ReleaseNone => 2.03+

    Back to the top

    Powered by Savane 3.3