Re: ELF - are .comment and .note sections needed? Inline syscalls?

Philippe Strauss (philou@sicel-home-1-4.urbanet.ch)
Thu, 17 Oct 1996 21:11:29 +0200 (MET DST)


Tom Zerucha wrote:
>
> I was experimenting to see how small I could make an executable, and found
> that readelf showed .comment and .note sections in the code. It would
> sometimes show others too. Are they used for any purpose? strip won't
> remove them unless you specifically say --remove-section= for each one you
> want to remove.
>
> Also, is there any way to force the inlining of system calls? If I
> include asm/unistd.h I can define a write() that will simply be the system
> call, but gcc always wants to talk to libc. Is there a particular reason
> that write isn't inlined by gcc, or have I stupidly overlooked something.
>

Dont know a dime about your question, but since i'm playing around
with objdump -d, i found /bin/sync very small (396 bytes) and
objdump -d give this:

sync: file format elf32-i386

No symbols in "sync".
Disassembly of section .text:
08000080 movl $0x24,%eax
08000085 int $0x80
08000087 movl $0x1,%eax
0800008c movl $0x0,%ebx
08000091 int $0x80

but this one was sure written in assembler. (It comes from debian 1.1)

-- 
Philippe Strauss, CH-1092 Belmont

Email: <philippe.strauss@urbanet.ch> Homepage: http://sicel-home-1-4.urbanet.ch