Re: Huge difference in build sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 2, 2014 at 10:50 AM, Vinícius Tinti <viniciustinti@xxxxxxxxx> wrote:
> On Tue, Dec 2, 2014 at 10:37 AM, Raghavendra <arrao@xxxxxxx> wrote:
>> Hello Tinti,
>>
>> Thank you for the reply.
>>
>> On Tuesday 02 December 2014 05:21 PM, Vinícius Tinti wrote:
>>>
>>> On Tue, Dec 2, 2014 at 7:08 AM, Raghavendra <arrao@xxxxxxx> wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I am using Ubuntu-12.04 which came with 3.2 kernel. Parallel to this,
>>>> I've compiled and installed 3.12.1 kernel using the Ubuntu-3.2's
>>>> configuration, and the compiler which came with the distro. I've noticed
>>>> that there is a huge difference in the size of the .ko file between the
>>>> Ubuntu's kernel and the kernel which I've compiled. Sample results are :
>>>>
>>>> $ du -sh usb-storage.ko
>>>> It shows : 56K for the Ubuntu's 3.2 kernel
>>>>                   1.3M for the custom kernel that I've compiled
>>>>
>>>> I've tested the same thing for a simple hello world module :
>>>> $ du -sh hello.ko
>>>> It shows : 4.0k for the Ubuntu's 3.2 kernel
>>>>                   56k for the custom kernel that I've compiled
>>>>
>>>> What could be the reason for this huge amount of difference of storage
>>>> space in spite of using the same config file and compiler?
>>>
>>> Are you sure that you have build with the same optimization flags?
>>>
>>> I guess that "-O2" is missing in the big example. Could you double check?
>>
>> Actually, I haven't use any optimization flags. I've just hit 'make' from
>> the command line while compiling for both the kernels. I even checked the
>> Makefile of both the kernels. -O2 flag is used in the same way in both the
>> Makefiles.
>
> Strange. Can you try this?

Opps.
http://stackoverflow.com/questions/1999654/how-can-i-tell-if-a-library-was-compiled-with-g

Maybe there are debug symbols in one of the kernels. Dunno.

>
>> Regards,
>> Raghavendra
>>
>>>
>>> Regards
>>>
>>>> Thanks in advance.
>>>>
>>>> Raghavendra
>>>>
>>>>
>>>> -------------------------------------------------------------------------------------------------------------------------------
>>>> [ C-DAC is on Social-Media too. Kindly follow us at:
>>>> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>>>>
>>>> This e-mail is for the sole use of the intended recipient(s) and may
>>>> contain confidential and privileged information. If you are not the
>>>> intended recipient, please contact the sender by reply e-mail and destroy
>>>> all copies and the original message. Any unauthorized review, use,
>>>> disclosure, dissemination, forwarding, printing or copying of this email
>>>> is strictly prohibited and appropriate legal action will be taken.
>>>>
>>>> -------------------------------------------------------------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> Kernelnewbies mailing list
>>>> Kernelnewbies@xxxxxxxxxxxxxxxxx
>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> -------------------------------------------------------------------------------------------------------------------------------
>> [ C-DAC is on Social-Media too. Kindly follow us at:
>> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>>
>> This e-mail is for the sole use of the intended recipient(s) and may
>> contain confidential and privileged information. If you are not the
>> intended recipient, please contact the sender by reply e-mail and destroy
>> all copies and the original message. Any unauthorized review, use,
>> disclosure, dissemination, forwarding, printing or copying of this email
>> is strictly prohibited and appropriate legal action will be taken.
>> -------------------------------------------------------------------------------------------------------------------------------
>>
>
>
>
> --
> Simplicity is the ultimate sophistication



-- 
Simplicity is the ultimate sophistication

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies





[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux