This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bloated binaries following the use of AT(...) linker script command


Hello All,

To change the load address of an application through the AT(...)
command, the linker script has been changed as:

PHDRS {
-       text PT_LOAD FLAGS(7);  /* RWX */
+      text PT_LOAD AT(0xffffffff84000000) FLAGS(7);   /* RWX */
        note PT_NOTE FLAGS(4);  /* R__ */
}

However, due to the above change the executable bloats up from about
16MB to about a Gibabyte. The output of the readelf indicates that the
start of section headers shifted by large value:

Entry point address:             0xc00050b0
Start of program headers:    52 (bytes into file)
Start of section headers:      1069295608 (bytes into file)

Although the sum of the sizes of individual section is only about
16MB, the size of the segment (only one segment) increases by the
bloated size:

Program Headers:
Type        Offset        VirtAddr        PhysAddr      FileSiz
  MemSiz     Flg      Align
LOAD     0x002000 0xc0000000 0x84000000 0x3fbbc8a0 0x3fc27f50 RWE   0x2000

Could someone indicate the possible reasons for the bloating of the executable ?

thank you,
Prasad.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]