[lkml]   [1996]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ELF - are .comment and .note sections needed? Inline syscalls?
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: <>

 \ /
  Last update: 2005-03-22 13:37    [W:0.031 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site