0

I could see lib/asm-offset.c file in u-boot(2014.07) source(another file at arch/arm/lib/asm-offsets.c), main function is defined in these files. Initially I got doubht who will call this main function, I checked Makefile, but no entry for this file in Makefile also. After build there is no object file for this. I could see only asm-offsets.s and asm-offsets.su files after build. asm-offsets.s is around 1000 lines and asm-offsets.su is having only one line - asm-offsets.c:19:5:main 0 static. From the asm-offsets.c source, it seems it is declaring some variables. Can you please help to understand how this source is embedded in U-boot bin

user3693586
  • 1,227
  • 5
  • 18
  • 40
  • Can anyone help to understand the above doubt. – user3693586 Feb 17 '16 at 03:33
  • It seems lib/asm-offsets.c file is used to create generic-asm-offsets.h header file under include/generated/ and arch/arm/lib/asm-offsets.c file is used to create asm-offsets.h header file under include/generated/. – user3693586 Feb 18 '16 at 10:29

1 Answers1

0

lib/asm-offsets.c file is used to generate header file with definitions for global data size, board info size etc..., These definitions will be used in assembly files.

We can see following lines while building u-boot.

  CC      lib/asm-offsets.s
  GEN     include/generated/generic-asm-offsets.h

similarly for arch/arm/lib/asm-offsets.c

CC      arch/arm/lib/asm-offsets.s
GEN     include/generated/asm-offsets.h
user3693586
  • 1,227
  • 5
  • 18
  • 40