Hi,
 
I'm new to U-Boot. Here I got some questions when I read the following code in include/ppc_asm.tmpl:
 

#define START_GOT   \
 .section ".got2","aw"; \
.LCTOC1 = .+32768

#define END_GOT    \
 .text

#define GET_GOT    \
 bl 1f  ; \
 .text 2  ; \
0: .long .LCTOC1-1f ; \
 .text   ; \
1: mflr r14  ; \
 lwz r0,0b-1b(r14) ; \
 add r14,r0,r14 ;

#define GOT_ENTRY(NAME)  .L_  ## NAME  = . - .LCTOC1 ; .long NAME

#define GOT(NAME)  .L_  ##  NAME (r14)

1. As what I understand, after lwz r0,0b-1b(r14) , LOCTOC1-1f is stored in r0, but I totally lost with the following instruction:

 add r14,r0,r14. What's in r14 now. Is the value of  label "1f"  the absolute address or relative address of the code it labels or whatever else?

2. What do the #define directives do here? I noticed there are spaces before and after "##"; what's the value of NAME in ".long NAME". In cup/mpc8xx/start.S,  some code such as "lwz r7, GOT(_start)" invokes the macro.

Any idea will be truly appreciated.

David