NetBSD Problem Report #53952
From www@NetBSD.org Wed Feb 6 12:46:13 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AF0D57A1D0
for <gnats-bugs@gnats.NetBSD.org>; Wed, 6 Feb 2019 12:46:13 +0000 (UTC)
Message-Id: <20190206124611.BE44B7A1EF@mollari.NetBSD.org>
Date: Wed, 6 Feb 2019 12:46:11 +0000 (UTC)
From: Karthik_Gengan@Dell.com
Reply-To: Karthik_Gengan@Dell.com
To: gnats-bugs@NetBSD.org
Subject: Netbsd 7.1 binary size increased when compared to NetBsd 5.1
X-Send-Pr-Version: www-1.0
>Number: 53952
>Category: toolchain
>Synopsis: Netbsd 7.1 binary size increased when compared to NetBsd 5.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Wed Feb 06 12:50:00 +0000 2019
>Originator: Karthik Gengan
>Release: netbsd-7-1-2-RELEASE
>Organization:
Dell
>Environment:
NetBSD 7.1.2 Dell Networking OS Release 7-1(0-187) NetBSD 7.1.2 (blade IOM) #12: Wed Feb 6 14:50:18 IST 2019 gkarthik@ecluster-maa-04:/neteng/gkarthik/code/gk_Maa_NetBsd_1/SW-NetBSD7/usr/src/sys/arch/evbmips/compile/STOMP evbmips
>Description:
Hi,
In the process of NetBSD 7.1.2 (MIPS Architecture) porting, we inferred that binary size got increased drastically when compared to NetBSD 5.1 version.
So can you please confirm why there is a size difference between two NetBSD versions , are we missing any flags in compilation / toolchain ?
During our testing , we conclude that following section size got increased drastically when we compared to NetBSD 5.1
1.eeh_frame
2.shstrtab
3.symtab
4.strtab
Sample Program:-
----------------
SP.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("welcome to NetBsd\n");
int ind =0;
for(ind=0;ind<100;ind++)
system("ls -lrt");
return 0;
}
Sample Program Execution on NetBSD 7.1.2
-----------------------------------------
mips64--netbsd-readelf -a SP.c
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .note.netbsd.iden NOTE 100000b4 0000b4 000018 00 A 0 0 4
[ 2] .note.netbsd.pax NOTE 100000cc 0000cc 000014 00 A 0 0 4
[ 3] .reginfo MIPS_REGINFO 100000e0 0000e0 000018 18 A 0 0 8
[ 4] .rel.dyn REL 100000f8 0000f8 000148 08 A 0 0 4
[ 5] .init PROGBITS 10000240 000240 000038 00 AX 0 0 4
[ 6] .text PROGBITS 10000280 000280 055480 00 AX 0 0 16
[ 7] .fini PROGBITS 10055700 055700 000038 00 AX 0 0 4
[ 8] .rodata PROGBITS 10055740 055740 009610 00 A 0 0 16
[ 9] .eh_frame PROGBITS 1006f000 05f000 00e208 00 WA 0 0 8
[10] .ctors PROGBITS 1007d208 06d208 000010 00 WA 0 0 4
[11] .dtors PROGBITS 1007d218 06d218 000008 00 WA 0 0 4
[12] .jcr PROGBITS 1007d220 06d220 000004 00 WA 0 0 8
[13] .data.rel.ro PROGBITS 1007d228 06d228 0031b8 00 WA 0 0 8
[14] .data PROGBITS 100803e0 0703e0 000930 00 WA 0 0 16
[15] .got PROGBITS 10080d10 070d10 000ad8 04 WAp 0 0 16
[16] .sbss PROGBITS 100817e8 0717e8 000084 00 WAp 0 0 8
[17] .bss NOBITS 10081870 07186c 088e20 00 WA 0 0 16
[18] .comment PROGBITS 00000000 07186c 000021 01 MS 0 0 1
[19] .pdr PROGBITS 00000000 071890 0087a0 00 0 0 4
[20] .ident PROGBITS 00000000 07a030 002366 00 0 0 1
[21] .debug_aranges MIPS_DWARF 00000000 07c398 001900 00 0 0 8
[22] .debug_info MIPS_DWARF 00000000 07dc98 07d21a 00 0 0 1
[23] .debug_abbrev MIPS_DWARF 00000000 0faeb2 013b9d 00 0 0 1
[24] .debug_line MIPS_DWARF 00000000 10ea4f 028474 00 0 0 1
[25] .debug_frame MIPS_DWARF 00000000 136ec4 00ed28 00 0 0 4
[26] .debug_str MIPS_DWARF 00000000 145bec 00ed46 01 MS 0 0 1
[27] .debug_loc MIPS_DWARF 00000000 154932 074b02 00 0 0 1
[28] .debug_ranges MIPS_DWARF 00000000 1c9438 006b98 00 0 0 8
[29] .gnu.attributes LOOS+ffffff5 00000000 1cffd0 000010 00 0 0 1
[30] .shstrtab STRTAB 00000000 1cffe0 00012f 00 0 0 1
[31] .symtab SYMTAB 00000000 1d0638 1491f0 10 32 83073 4
[32] .strtab STRTAB 00000000 319828 02860a 00 0 0 1
Sample Program Execution on NetBSD 5.1
-----------------------------------------
mips64--netbsd-readelf -a SP.c
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .note.netbsd.iden NOTE 100000d4 0000d4 000018 00 A 0 0 4
[ 2] .note.netbsd.pax NOTE 100000ec 0000ec 000014 00 A 0 0 4
[ 3] .init PROGBITS 10000100 000100 000070 00 AX 0 0 4
[ 4] .text PROGBITS 10000170 000170 04f200 00 AX 0 0 16
[ 5] .fini PROGBITS 1004f370 04f370 00004c 00 AX 0 0 4
[ 6] .rodata PROGBITS 1004f3c0 04f3c0 009695 00 A 0 0 16
[ 7] .reginfo MIPS_REGINFO 10058a58 058a58 000018 18 A 0 0 8
[ 8] .eh_frame PROGBITS 10058a70 058a70 000004 00 A 0 0 4
[ 9] .ctors PROGBITS 10158a74 058a74 000010 00 WA 0 0 4
[10] .dtors PROGBITS 10158a84 058a84 000008 00 WA 0 0 4
[11] .jcr PROGBITS 10158a8c 058a8c 000004 00 WA 0 0 4
[12] .data.rel.ro PROGBITS 10158a90 058a90 003598 00 WA 0 0 8
[13] .data PROGBITS 1015c030 05c030 000a30 00 WA 0 0 16
[14] link_set_all_cate PROGBITS 1015ca60 05ca60 00001c 00 WA 0 0 4
[15] .got PROGBITS 1015ca80 05ca80 000b68 04 WAp 0 0 16
[16] .sbss NOBITS 1015d5e8 05d5e8 00007c 00 WAp 0 0 8
[17] .bss NOBITS 1015d670 05d5e8 06f928 00 WA 0 0 16
[18] .comment PROGBITS 00000000 05d5e8 0036bc 00 0 0 1
[19] .debug_aranges MIPS_DWARF 00000000 060ca4 0019e0 00 0 0 1
[20] .debug_pubnames MIPS_DWARF 00000000 062684 0050e0 00 0 0 1
[21] .debug_info MIPS_DWARF 00000000 067764 067410 00 0 0 1
[22] .debug_abbrev MIPS_DWARF 00000000 0ceb74 012a1b 00 0 0 1
[23] .debug_line MIPS_DWARF 00000000 0e158f 023d5a 00 0 0 1
[24] .debug_frame MIPS_DWARF 00000000 1052ec 007580 00 0 0 4
[25] .debug_str MIPS_DWARF 00000000 10c86c 00f00e 01 MS 0 0 1
[26] .debug_loc MIPS_DWARF 00000000 11b87a 0381f1 00 0 0 1
[27] .pdr PROGBITS 00000000 153a6c 007e60 00 0 0 4
[28] .mdebug.abiN32 PROGBITS 00000000 15b8cc 000000 00 0 0 1
[29] .ident PROGBITS 00000000 15b8cc 002856 00 0 0 1
[30] .debug_ranges MIPS_DWARF 00000000 15e122 0052d0 00 0 0 1
[31] .shstrtab STRTAB 00000000 1633f2 00014d 00 0 0 1
[32] .symtab SYMTAB 00000000 163a90 007710 10 33 818 4
[33] .strtab STRTAB 00000000 16b1a0 00a4fa 00 0 0 1
Thanks & Regards,
Karthik.G
>How-To-Repeat:
compile program in NetBSD 7.1.2 vs NetBSD 5.1
>Fix:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.