[kanchilug] 1D1C - size

  • From: Dhanasekar <tkdhanasekar@xxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx, kanchilug@xxxxxxxxxxxxx, ilugd@xxxxxxxxxxxxxxxxxxxx
  • Date: Sun, 19 Feb 2023 06:00:00 +0530

size - list section sizes and total size of binary files

$ cat hello.c
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

$ gcc hello.c -o hello.o

$ size hello.o

To display in octal
$ size -o hello.o

To display in hexadecimal
$ size -x hello.o

To display in system V format and hexadecimal values
$ size -Ax hello.o



regards,
T.Dhanasekar

Other related posts:

  • » [kanchilug] 1D1C - size - Dhanasekar