public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Russell Peterson" <russell@mellanox.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "discuss@edk2.groups.io" <discuss@edk2.groups.io>,
	edk2-devel-groups-io <devel@edk2.groups.io>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()
Date: Sun, 16 Jun 2019 14:11:42 +0000	[thread overview]
Message-ID: <PR1PR05MB5579CEA8692729B19130E5F4C7E80@PR1PR05MB5579.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <CAKv+Gu9HAtptUKrtZe7LaQfTRZ26ofyT5QxEJjTR8jtGis15GQ@mail.gmail.com>

Hi, Ard.

-bash-4.2$ readelf -S /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
There are 25 section headers, starting at offset 0x2a940:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .text             PROGBITS         0000000000000240  00000240
       0000000000000320  0000000000000008  AX       0     0     32
  [ 2] .rela.text        RELA             0000000000000000  000175f8
       00000000000002d0  0000000000000018   I      22     1     8
  [ 3] .data             PROGBITS         0000000000000560  00000560
       0000000000000258  0000000000000000  WA       0     0     32
  [ 4] .rela.data        RELA             0000000000000000  000178c8
       0000000000000060  0000000000000018   I      22     3     8
  [ 5] .eh_frame         PROGBITS         00000000000007c0  000007c0
       0000000000000108  0000000000000000   A       0     0     8
  [ 6] .rela.eh_frame    RELA             0000000000000000  00017928
       0000000000000120  0000000000000018   I      22     5     8
  [ 7] .eh_frame_hdr     PROGBITS         00000000000008c8  000008c8
       000000000000004c  0000000000000000   A       0     0     4
  [ 8] .rela             RELA             0000000000000918  00000918
       0000000000000060  0000000000000018           0     0     8
  [ 9] .build-id         PROGBITS         0000000000000978  00000978
       0000000000000024  0000000000000000           0     0     4
  [10] .debug_info       PROGBITS         0000000000000000  0000099c
       000000000000bc4c  0000000000000000           0     0     1
  [11] .rela.debug_info  RELA             0000000000000000  00017a48
       0000000000011220  0000000000000018   I      22    10     8
  [12] .debug_abbrev     PROGBITS         0000000000000000  0000c5e8
       00000000000017d3  0000000000000000           0     0     1
  [13] .debug_line       PROGBITS         0000000000000000  0000ddbb
       00000000000031ed  0000000000000000           0     0     1
  [14] .rela.debug_line  RELA             0000000000000000  00028c68
       0000000000000120  0000000000000018   I      22    13     8
  [15] .debug_str        PROGBITS         0000000000000000  00010fa8
       0000000000002cd3  0000000000000001  MS       0     0     1
  [16] .debug_loc        PROGBITS         0000000000000000  00013c7b
       0000000000000ba1  0000000000000000           0     0     1
  [17] .rela.debug_loc   RELA             0000000000000000  00028d88
       00000000000013e0  0000000000000018   I      22    16     8
  [18] .debug_aranges    PROGBITS         0000000000000000  0001481c
       00000000000000e0  0000000000000000           0     0     1
  [19] .rela.debug_arang RELA             0000000000000000  0002a168
       0000000000000138  0000000000000018   I      22    18     8
  [20] .debug_ranges     PROGBITS         0000000000000000  000148fc
       0000000000000270  0000000000000000           0     0     1
  [21] .rela.debug_range RELA             0000000000000000  0002a2a0
       00000000000005d0  0000000000000018   I      22    20     8
  [22] .symtab           SYMTAB           0000000000000000  00014b70
       00000000000027a8  0000000000000018          23   402     8
  [23] .strtab           STRTAB           0000000000000000  00017318
       00000000000002da  0000000000000000           0     0     1
  [24] .shstrtab         STRTAB           0000000000000000  0002a870
       00000000000000d0  0000000000000000           0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  p (processor specific)

-----Original Message-----
From: Ard Biesheuvel <ard.biesheuvel@linaro.org> 
Sent: Saturday, June 15, 2019 4:29 AM
To: Russell Peterson <russell@mellanox.com>
Cc: discuss@edk2.groups.io; edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@mellanox.com> wrote:
>
> Here is a sample of the gcc command line:
>
> "/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
> -I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g 
> -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror 
> -Wno-array-bounds -ffunction-sections -fdata-sections -incl\ ude 
> AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os 
> -fshort-wchar -fno-builtin -fno-stri\ ct-aliasing -Wall -Werror 
> -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian 
> -fno-short-enums -\ fverbose-asm -funsigned-char -ffunction-sections 
> -fdata-sections -Wno-address -fno-asynchronous-unwind-tables\  
> -fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable 
> -Wno-unused-const-variable -mcmodel=tiny -n\ ostdinc -nostdlib 
> -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o 
> /x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
> BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files 
> left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
>
> echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\ 
> H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
> --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
> deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
> echo  /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
> twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
>

Could you dump the section headers of such a .dll using readelf -S please?

  reply	other threads:[~2019-06-16 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM6PR05MB5572BFC98AF62AFED0244CC0C7EF0@AM6PR05MB5572.eurprd05.prod.outlook.com>
2019-06-14 19:17 ` [edk2-discuss] WriteSections64() Laszlo Ersek
2019-06-14 19:43   ` [edk2-devel] " Ard Biesheuvel
2019-06-14 21:19     ` Russell Peterson
     [not found]     ` <15A82D62E078CF58.4443@groups.io>
2019-06-15  0:17       ` Russell Peterson
2019-06-15  8:28         ` Ard Biesheuvel
2019-06-16 14:11           ` Russell Peterson [this message]
2019-06-17 12:56             ` Russell Peterson
2019-06-17  9:41         ` Ard Biesheuvel

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-list 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=PR1PR05MB5579CEA8692729B19130E5F4C7E80@PR1PR05MB5579.eurprd05.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox