All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 15/18] efi_loader: output load options in helloworld
Date: Mon, 11 Dec 2017 09:15:46 +0100	[thread overview]
Message-ID: <fc442e3d-9a03-4294-c962-de67f33d35fc@suse.de> (raw)
In-Reply-To: <9af3fa58-e376-193b-0b87-217931db3755@gmail.com>



On 10.12.17 23:20, Florian Fainelli wrote:
> 
> 
> On 12/09/2017 10:40 PM, Heinrich Schuchardt wrote:
>> On 12/10/2017 12:09 AM, Florian Fainelli wrote:
>>>
>>>
>>> On 11/26/2017 05:05 AM, Heinrich Schuchardt wrote:
>>>> We need to test if we pass a valid image handle when loading
>>>> and EFI application. This cannot be done in efi_selftest as
>>>> it is not loaded as an image.
>>>>
>>>> So let's enhance helloworld a bit.
>>>>
>>>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>>
>>> This particular patch/commit bbf75dd9345d0b1a7ec7a50016547eb7c759b7af
>>> ("efi_loader: output load options in helloworld") was bisected and
>>> causes the Lamobo_R1_defconfig build using the toolchain at [1] to fail
>>> with:
>>>
>>> /home/fainelli/work/toolchains/stbgcc-6.3-1.1/bin/arm-linux-ld.bfd:
>>> error: required section '.got' not found in the linker script
>>> /home/fainelli/work/toolchains/stbgcc-6.3-1.1/bin/arm-linux-ld.bfd:
>>> final link failed: Invalid operation
>>> scripts/Makefile.lib:409: recipe for target
>>> 'lib/efi_loader/helloworld_efi.so' failed
>>> make[2]: *** [lib/efi_loader/helloworld_efi.so] Error 1
>>> rm lib/efi_loader/helloworld.o
>>> scripts/Makefile.build:425: recipe for target 'lib/efi_loader' failed
>>> make[1]: *** [lib/efi_loader] Error 2
>>>
>>> [1]: https://github.com/Broadcom/stbgcc-6.3/releases/tag/stbgcc-6.3-1.1
>>>
>>
>> Isn't this fixed by
>> http://git.denx.de/?p=u-boot.git;a=commit;h=3bb74f9800cdc4cf10a87f2725242c2565256654
>>
>> "efi_loader helloworld.efi: Fix building with -Os" ?
> 
> Nope, my tree is at v2018.01-rc1-115-g335f7b1290ce which contains that
> commit already.

Yeah, but the issue is the same :(

$ nm lib/efi_loader/helloworld.o
00000000 T efi_main
         U memcpy

Gcc simply optimizes the loaded_image_guid assignment into a memcpy()
and I can't find any way to prohibit it from doing that.

I guess the easiest way out of that mess is to just not do a dynamic
struct assignment but instead put loaded_image_guid explicitly into the
.rodata section.

I'll send a patch.


Alex

  reply	other threads:[~2017-12-11  8:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-26 13:05 [U-Boot] [PATCH v3 00/18] efi_loader: manage protocols in a linked list (v3) Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 01/18] efi_loader: helloworld.c: remove superfluous include Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 02/18] efi_loader: size of media device path node represenation Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 03/18] efi_loader: efi_dp_str should print path not node Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 04/18] efi_loader: fix efi_convert_device_node_to_text Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 05/18] efi_loader: reimplement LocateDevicePath Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 06/18] efi_selftest: test EFI_DEVICE_PATH_TO_TEXT_PROTOCOL Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 07/18] efi_loader: efi_disk: use efi_add_protocol Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 08/18] efi_loader: efi_net: " Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 09/18] efi_loader: efi_gop: " Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 10/18] efi_loader: simplify efi_open_protocol Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 11/18] efi_loader: simplify find_obj Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 12/18] efi_loader: manage protocols in a linked list Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 13/18] efi_selftest: compile without special compiler flags Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 14/18] efi_selftest: add missing line feed Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 15/18] efi_loader: output load options in helloworld Heinrich Schuchardt
2017-12-09 23:09   ` Florian Fainelli
2017-12-10  6:40     ` Heinrich Schuchardt
2017-12-10 22:20       ` Florian Fainelli
2017-12-11  8:15         ` Alexander Graf [this message]
2017-11-26 13:05 ` [U-Boot] [PATCH v3 16/18] test/py: check return code of helloworld Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 17/18] efi_loader: pass handle of loaded image Heinrich Schuchardt
2017-11-26 13:05 ` [U-Boot] [PATCH v3 18/18] efi_loader: helper function to add EFI object to list Heinrich Schuchardt
2017-11-27 17:09 ` [U-Boot] [PATCH v3 00/18] efi_loader: manage protocols in a linked list (v3) Simon Glass
2017-12-01 12:42   ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc442e3d-9a03-4294-c962-de67f33d35fc@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.