On Wed, Jul 22, 2015 at 02:02:11AM -0600, Jan Beulich wrote:
> >>> On 21.07.15 at 19:23, <daniel.ki...@oracle.com> wrote:
> > First of all ld generates .got.plt section and objcopy copy it to binary
> > file.
> > It is not needed because we do not link our stuff here with shared
> > libraries.
> > So, we can use -R objcopy option to remove it (if you do not like -j .text).
> > This way we could save 15 bytes (at least on my machines).
>
> So I checked and did find no .got.plt at all on a machine using
> binutils 2.25 and an empty one on a machine using an older
> version. So I'm curious what you're seeing present in that
> table (without any of your patches applied).

Here it is:

[...]

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00     0   0  0
  [ 1] .text             PROGBITS        00000000 000080 000705 00 WAX 0   0 16
  [ 2] .eh_frame         PROGBITS        00000708 000788 000104 00   A 0   0  4
  [ 3] .got.plt          PROGBITS        0000080c 00088c 00000c 04  WA 0   0  4
  [ 4] .comment          PROGBITS        00000000 000898 00001c 01  MS 0   0  1
  [ 5] .debug_aranges    PROGBITS        00000000 0008b4 000020 00     0   0  1
  [ 6] .debug_info       PROGBITS        00000000 0008d4 000c2c 00     0   0  1
  [ 7] .debug_abbrev     PROGBITS        00000000 001500 000303 00     0   0  1
  [ 8] .debug_line       PROGBITS        00000000 001803 000180 00     0   0  1
  [ 9] .debug_str        PROGBITS        00000000 001983 000236 01  MS 0   0  1
  [10] .debug_loc        PROGBITS        00000000 001bb9 0007b8 00     0   0  1
  [11] .debug_ranges     PROGBITS        00000000 002371 000030 00     0   0  1
  [12] .shstrtab         STRTAB          00000000 0023a1 000096 00     0   0  1
  [13] .symtab           SYMTAB          00000000 002690 000290 10    14  36  4
  [14] .strtab           STRTAB          00000000 002920 000162 00     0   0  1

[...]

It is generated using ld from binutils 2.22.

I was thinking that -static ld option would remove .got.plt but it did not.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to