I have just looked at the BeagleBoard and the result seems correct:

 

$ build -a ARM -p BeagleBoardPkg/BeagleBoardPkg.dsc -t GCC48

 

$ /work/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-objdump -S -D Build/BeagleBoard/DEBUG_GCC48/ARM/ArmPlatformPkg/PrePi/PeiUniCore/DEBUG/ArmPlatformPrePiUniCore.dll

 

  FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdBaseAddress) + (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdSize);

    705c:  4b90                      ldr           r3, [pc, #576]      ; (72a0 <MemoryPeim+0x2a4>)

    705e: 681b                      ldr           r3, [r3, #0]

    7060: 4618      mov       r0, r3

    7062: f04f 0100              mov.w  r1, #0

    7066: 4b8f      ldr           r3, [pc, #572]      ; (72a4 <MemoryPeim+0x2a8>)

    7068: 681b                      ldr           r3, [r3, #0]

    706a: 461a      mov       r2, r3

    706c:  f04f 0300              mov.w  r3, #0

 

(...)

 

    72a0: 0000b4ec             andeq   fp, r0, ip, ror #9

    72a4: 0000b4f0              strdeq   fp, [r0], -r0

 

(...)

 

0000b4ec <_gPcd_FixedAtBuild_PcdFdBaseAddress>:

    b4ec: 80008000             andhi     r8, r0, r0

 

0000b4f0 <_gPcd_FixedAtBuild_PcdFdSize>:

    b4f0:  000b0000             andeq   r0, fp, r0

 

 

I noticed in an earlier email you mentioned ArmPlatformPrePiUniCore.lib. If you want to look at the final ELF file, you should have a look at ‘.dll’. I know the name is confusing... But ‘.dll’ is actually a ELF file!

 

 

From: Varad Gautam [mailto:varadgautam@gmail.com]
Sent: 29 July 2014 08:56
To: Olivier Martin
Cc: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org
Subject: Re: [Linaro-uefi] [edk2] Strange Issue With PcdGetXX()

 

The PCDs I'm using for BBB show listed under 'Discarded input sections' in
ArmPlatformPrePiUniCore.map, wheareas when building OvmfPkgX64, PCDs
are not discarded.


So I am thinking,

* Does this mean they are not being referenced properly? I'll checkout how OvmfPkg

is using them.

* Is 'GLOBAL_REMOVE_IF_UNREFERENCED' in AutoGen.h responsible for this? [1]


[1] https://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg07501.html

Thanks,
Varad

 

On Sat, Jul 26, 2014 at 11:14 PM, Varad Gautam <varadgautam@gmail.com> wrote:

On Sat, Jul 26, 2014 at 12:04 AM, Olivier Martin <Olivier.Martin@arm.com> wrote:
>
> Try this one: http://releases.linaro.org/14.04/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2014.04.tar.xz with the EDK2 Toolchain 'GCC48'.
>

Didn't work either, tried building from source as well as the
pre-built binaries at [1].

Checking GOT now.


[1] http://releases.linaro.org/14.04/components/toolchain/binaries


Thanks,
Varad