ppc4xx: Cleanup for partial linking and --gc-sections
This commit adapts 4xx boards for partial linking with --gc-sections. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Tirumala Marri <tmarri@apm.com> Cc: David Updegraff <dave@cray.com> Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Larry Johnson <lrj@acm.org> Cc: Peter De Schrijver <p2@mind.be> Cc: Niklaus Giger <niklaus.giger@netstal.com> Cc: Daniel Poirot <dan.poirot@windriver.com> Acked-by: Stefan Roese <sr@denx.de>
This commit is contained in:
		
							parent
							
								
									c08e5cf7c7
								
							
						
					
					
						commit
						ee8028b7f1
					
				|  | @ -27,8 +27,7 @@ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| OUTPUT_ARCH(powerpc) | OUTPUT_ARCH(powerpc) | ||||||
| /* Do we need any of these for elf? | 
 | ||||||
|    __DYNAMIC = 0;    */ |  | ||||||
| PHDRS | PHDRS | ||||||
| { | { | ||||||
|   text PT_LOAD; |   text PT_LOAD; | ||||||
|  | @ -39,43 +38,16 @@ SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|    } :text |    } :text | ||||||
|     _etext = .; |     _etext = .; | ||||||
|     PROVIDE (etext = .); |     PROVIDE (etext = .); | ||||||
|     .rodata    : |     .rodata    : | ||||||
|    { |    { | ||||||
|     *(.eh_frame) |  | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } :text |   } :text | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -83,23 +55,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |   __fixup_entries = (. - _FIXUP_TABLE_) >> 2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -138,7 +106,7 @@ SECTIONS | ||||||
| 
 | 
 | ||||||
|   .resetvec RESET_VECTOR_ADDRESS : |   .resetvec RESET_VECTOR_ADDRESS : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } :text = 0xffff |   } :text = 0xffff | ||||||
| 
 | 
 | ||||||
|   . = RESET_VECTOR_ADDRESS + 0x4; |   . = RESET_VECTOR_ADDRESS + 0x4; | ||||||
|  | @ -157,9 +125,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|   } :bss |   } :bss | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -26,34 +26,13 @@ SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     /* WARNING - the following is hand-optimized to fit within	*/ |     /* WARNING - the following is hand-optimized to fit within	*/ | ||||||
|     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ |     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ | ||||||
| 
 | 
 | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text*) | ||||||
|  |     board/amcc/bamboo/init.o		(.text*) | ||||||
| 
 | 
 | ||||||
|     /* Align to next NAND block */ |     /* Align to next NAND block */ | ||||||
|     . = ALIGN(0x4000); |     . = ALIGN(0x4000); | ||||||
|  | @ -61,8 +40,7 @@ SECTIONS | ||||||
|     /* Keep some space here for redundant env and potential bad env blocks */ |     /* Keep some space here for redundant env and potential bad env blocks */ | ||||||
|     . = ALIGN(0x10000); |     . = ALIGN(0x10000); | ||||||
| 
 | 
 | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|  | @ -70,9 +48,6 @@ SECTIONS | ||||||
|   { |   { | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -80,23 +55,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -122,9 +93,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -33,8 +33,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -26,34 +26,13 @@ SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     /* WARNING - the following is hand-optimized to fit within	*/ |     /* WARNING - the following is hand-optimized to fit within	*/ | ||||||
|     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ |     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ | ||||||
| 
 | 
 | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text) | ||||||
|  |     board/amcc/canyonlands/init.o	(.text*) | ||||||
| 
 | 
 | ||||||
|     /* Align to next NAND block */ |     /* Align to next NAND block */ | ||||||
|     . = ALIGN(0x20000); |     . = ALIGN(0x20000); | ||||||
|  | @ -61,8 +40,7 @@ SECTIONS | ||||||
|     /* Keep some space here for redundant env and potential bad env blocks */ |     /* Keep some space here for redundant env and potential bad env blocks */ | ||||||
|     . = ALIGN(0x80000); |     . = ALIGN(0x80000); | ||||||
| 
 | 
 | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|  | @ -70,9 +48,6 @@ SECTIONS | ||||||
|   { |   { | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -80,23 +55,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -122,9 +93,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -26,34 +26,13 @@ SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     /* WARNING - the following is hand-optimized to fit within	*/ |     /* WARNING - the following is hand-optimized to fit within	*/ | ||||||
|     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ |     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ | ||||||
| 
 | 
 | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text) | ||||||
|  |     board/amcc/sequoia/init.o	(.text*) | ||||||
| 
 | 
 | ||||||
|     /* Align to next NAND block */ |     /* Align to next NAND block */ | ||||||
|     . = ALIGN(0x4000); |     . = ALIGN(0x4000); | ||||||
|  | @ -61,8 +40,7 @@ SECTIONS | ||||||
|     /* Keep some space here for redundant env and potential bad env blocks */ |     /* Keep some space here for redundant env and potential bad env blocks */ | ||||||
|     . = ALIGN(0x10000); |     . = ALIGN(0x10000); | ||||||
| 
 | 
 | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|  | @ -70,9 +48,6 @@ SECTIONS | ||||||
|   { |   { | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -80,23 +55,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -122,9 +93,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -26,34 +26,12 @@ SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text*) | ||||||
|  |     board/amcc/sequoia/init.o		(.text*) | ||||||
| 
 | 
 | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|  | @ -61,9 +39,6 @@ SECTIONS | ||||||
|   { |   { | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -71,23 +46,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -113,9 +84,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -32,7 +32,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
|  | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $^) | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
|  |  | ||||||
|  | @ -22,68 +22,26 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| OUTPUT_ARCH(powerpc) | OUTPUT_ARCH(powerpc) | ||||||
| /* Do we need any of these for elf? | 
 | ||||||
|    __DYNAMIC = 0;    */ |  | ||||||
| SECTIONS | SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     /* WARNING - the following is hand-optimized to fit within	*/ |     /* WARNING - the following is hand-optimized to fit within	*/ | ||||||
|     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ |     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ | ||||||
| 
 | 
 | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text) | ||||||
|     board/amirix/ap1000/init.o	(.text) |     board/amirix/ap1000/init.o		(.text) | ||||||
|     arch/powerpc/cpu/ppc4xx/kgdb.o	(.text) |     *(.text*) | ||||||
|     arch/powerpc/cpu/ppc4xx/traps.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/interrupts.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/4xx_uart.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/cpu_init.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/speed.o	(.text) |  | ||||||
|     common/dlmalloc.o	(.text) |  | ||||||
|     lib/crc32.o		(.text) |  | ||||||
|     arch/powerpc/lib/extable.o	(.text) |  | ||||||
|     lib/zlib.o		(.text) |  | ||||||
| 
 |  | ||||||
| /*    . = env_offset;*/ |  | ||||||
| /*    common/env_embedded.o(.text)*/ |  | ||||||
| 
 |  | ||||||
|     *(.text) |  | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|   .rodata    : |   .rodata    : | ||||||
|   { |   { | ||||||
|     *(.eh_frame) |  | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -91,23 +49,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -131,9 +85,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -169,12 +169,6 @@ int misc_init_r (void) | ||||||
| 	return (0); | 	return (0); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* ------------------------------------------------------------------------- */ |  | ||||||
| phys_size_t initdram (int board_type) |  | ||||||
| { |  | ||||||
| 	return (L1_MEMSIZE); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* ------------------------------------------------------------------------- */ | /* ------------------------------------------------------------------------- */ | ||||||
| /* stubs so we can print dates w/o any nvram RTC.*/ | /* stubs so we can print dates w/o any nvram RTC.*/ | ||||||
| int rtc_get (struct rtc_time *tmp) | int rtc_get (struct rtc_time *tmp) | ||||||
|  |  | ||||||
|  | @ -22,59 +22,31 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| OUTPUT_ARCH(powerpc) | OUTPUT_ARCH(powerpc) | ||||||
| /* Do we need any of these for elf? | 
 | ||||||
|    __DYNAMIC = 0;    */ |  | ||||||
| SECTIONS | SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0xFFFFFFFC : |   .resetvec 0xFFFFFFFC : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o		(.text) |     arch/powerpc/cpu/ppc4xx/start.o	(.text) | ||||||
| 
 | 
 | ||||||
|     . = env_offset; |     . = env_offset; | ||||||
|     common/env_embedded.o(.text) |     common/env_embedded.o		(.text*) | ||||||
| 
 | 
 | ||||||
|     *(.text) |     *(.text*) | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|   .rodata    : |   .rodata    : | ||||||
|   { |   { | ||||||
|     *(.eh_frame) |  | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x0FFF) & 0xFFFFF000; |   . = (. + 0x0FFF) & 0xFFFFF000; | ||||||
|  | @ -82,23 +54,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |  | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|   PROVIDE (edata = .); |   PROVIDE (edata = .); | ||||||
|  | @ -124,9 +92,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -37,8 +37,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -22,68 +22,21 @@ | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| OUTPUT_ARCH(powerpc) | OUTPUT_ARCH(powerpc) | ||||||
| /* Do we need any of these for elf? | 
 | ||||||
|    __DYNAMIC = 0;    */ |  | ||||||
| SECTIONS | SECTIONS | ||||||
| { | { | ||||||
|   /* Read-only sections, merged into text segment: */ |   /* Read-only sections, merged into text segment: */ | ||||||
|   . = + SIZEOF_HEADERS; |   . = + SIZEOF_HEADERS; | ||||||
|   .interp : { *(.interp) } |  | ||||||
|   .hash          : { *(.hash)		} |  | ||||||
|   .dynsym        : { *(.dynsym)		} |  | ||||||
|   .dynstr        : { *(.dynstr)		} |  | ||||||
|   .rel.text      : { *(.rel.text)		} |  | ||||||
|   .rela.text     : { *(.rela.text)	} |  | ||||||
|   .rel.data      : { *(.rel.data)		} |  | ||||||
|   .rela.data     : { *(.rela.data)	} |  | ||||||
|   .rel.rodata    : { *(.rel.rodata)	} |  | ||||||
|   .rela.rodata   : { *(.rela.rodata)	} |  | ||||||
|   .rel.got       : { *(.rel.got)		} |  | ||||||
|   .rela.got      : { *(.rela.got)		} |  | ||||||
|   .rel.ctors     : { *(.rel.ctors)	} |  | ||||||
|   .rela.ctors    : { *(.rela.ctors)	} |  | ||||||
|   .rel.dtors     : { *(.rel.dtors)	} |  | ||||||
|   .rela.dtors    : { *(.rela.dtors)	} |  | ||||||
|   .rel.bss       : { *(.rel.bss)		} |  | ||||||
|   .rela.bss      : { *(.rela.bss)		} |  | ||||||
|   .rel.plt       : { *(.rel.plt)		} |  | ||||||
|   .rela.plt      : { *(.rela.plt)		} |  | ||||||
|   .init          : { *(.init)	} |  | ||||||
|   .plt : { *(.plt) } |  | ||||||
|   .text      : |   .text      : | ||||||
|   { |   { | ||||||
|     /* WARNING - the following is hand-optimized to fit within	*/ |     *(.text*) | ||||||
|     /* the sector layout of our flash chips!	XXX FIXME XXX	*/ |  | ||||||
| 
 |  | ||||||
|     arch/powerpc/cpu/ppc4xx/start.o	(.text) |  | ||||||
|     board/ml2/init.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/kgdb.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/traps.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/interrupts.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/4xx_uart.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/cpu_init.o	(.text) |  | ||||||
|     arch/powerpc/cpu/ppc4xx/speed.o	(.text) |  | ||||||
|     common/dlmalloc.o	(.text) |  | ||||||
|     lib/crc32.o		(.text) |  | ||||||
|     arch/powerpc/lib/extable.o	(.text) |  | ||||||
|     lib/zlib.o		(.text) |  | ||||||
| 
 |  | ||||||
| /*    . = env_offset;*/ |  | ||||||
| /*    common/env_embedded.o(.text)*/ |  | ||||||
| 
 |  | ||||||
|     *(.text) |  | ||||||
|     *(.got1) |  | ||||||
|   } |   } | ||||||
|   _etext = .; |   _etext = .; | ||||||
|   PROVIDE (etext = .); |   PROVIDE (etext = .); | ||||||
|   .rodata    : |   .rodata    : | ||||||
|   { |   { | ||||||
|     *(.eh_frame) |  | ||||||
|     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||||
|   } |   } | ||||||
|   .fini      : { *(.fini)    } =0 |  | ||||||
|   .ctors     : { *(.ctors)   } |  | ||||||
|   .dtors     : { *(.dtors)   } |  | ||||||
| 
 | 
 | ||||||
|   /* Read-write section, merged into data segment: */ |   /* Read-write section, merged into data segment: */ | ||||||
|   . = (. + 0x00FF) & 0xFFFFFF00; |   . = (. + 0x00FF) & 0xFFFFFF00; | ||||||
|  | @ -91,22 +44,19 @@ SECTIONS | ||||||
|   PROVIDE (erotext = .); |   PROVIDE (erotext = .); | ||||||
|   .reloc   : |   .reloc   : | ||||||
|   { |   { | ||||||
|     *(.got) |     KEEP(*(.got)) | ||||||
|     _GOT2_TABLE_ = .; |     _GOT2_TABLE_ = .; | ||||||
|     *(.got2) |     KEEP(*(.got2)) | ||||||
|     _FIXUP_TABLE_ = .; |     _FIXUP_TABLE_ = .; | ||||||
|     *(.fixup) |     KEEP(*(.fixup)) | ||||||
|   } |   } | ||||||
|   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; | ||||||
|   __fixup_entries = (. - _FIXUP_TABLE_)>>2; |   __fixup_entries = (. - _FIXUP_TABLE_)>>2; | ||||||
| 
 | 
 | ||||||
|   .data    : |   .data    : | ||||||
|   { |   { | ||||||
|     *(.data) |     *(.data*) | ||||||
|     *(.data1) |     *(.sdata*) | ||||||
|     *(.sdata) |  | ||||||
|     *(.sdata2) |  | ||||||
|     *(.dynamic) |  | ||||||
|     CONSTRUCTORS |     CONSTRUCTORS | ||||||
|   } |   } | ||||||
|   _edata  =  .; |   _edata  =  .; | ||||||
|  | @ -133,9 +83,8 @@ SECTIONS | ||||||
|   __bss_start = .; |   __bss_start = .; | ||||||
|   .bss (NOLOAD)       : |   .bss (NOLOAD)       : | ||||||
|   { |   { | ||||||
|    *(.sbss) *(.scommon) |    *(.bss*) | ||||||
|    *(.dynbss) |    *(.sbss*) | ||||||
|    *(.bss) |  | ||||||
|    *(COMMON) |    *(COMMON) | ||||||
|    . = ALIGN(4); |    . = ALIGN(4); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -34,7 +34,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
|  | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
| 	$(call cmd_link_o_target, $^) | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
|  |  | ||||||
|  | @ -96,13 +96,6 @@ int checkboard (void) | ||||||
| 
 | 
 | ||||||
| /* ------------------------------------------------------------------------- */ | /* ------------------------------------------------------------------------- */ | ||||||
| 
 | 
 | ||||||
| phys_size_t initdram (int board_type) |  | ||||||
| { |  | ||||||
| 	return  spd_sdram (); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* ------------------------------------------------------------------------- */ |  | ||||||
| 
 |  | ||||||
| int testdram (void) | int testdram (void) | ||||||
| { | { | ||||||
| 	/* TODO: XXX XXX XXX */ | 	/* TODO: XXX XXX XXX */ | ||||||
|  |  | ||||||
|  | @ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c) | ||||||
| OBJS	:= $(addprefix $(obj),$(COBJS)) | OBJS	:= $(addprefix $(obj),$(COBJS)) | ||||||
| SOBJS	:= $(addprefix $(obj),$(SOBJS)) | SOBJS	:= $(addprefix $(obj),$(SOBJS)) | ||||||
| 
 | 
 | ||||||
| $(LIB):	$(OBJS) $(SOBJS) | all:	$(LIB) $(SOBJS) | ||||||
| 	$(call cmd_link_o_target, $(OBJS) $(SOBJS)) | 
 | ||||||
|  | $(LIB):	$(OBJS) | ||||||
|  | 	$(call cmd_link_o_target, $^) | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f $(SOBJS) $(OBJS) | 	rm -f $(SOBJS) $(OBJS) | ||||||
|  |  | ||||||
|  | @ -93,6 +93,14 @@ | ||||||
| 
 | 
 | ||||||
| #define CONFIG_SPD_EEPROM	1	/* use SPD EEPROM for setup    */ | #define CONFIG_SPD_EEPROM	1	/* use SPD EEPROM for setup    */ | ||||||
| 
 | 
 | ||||||
|  | /*
 | ||||||
|  |  * I2C | ||||||
|  |  */ | ||||||
|  | #define CONFIG_HARD_I2C			/* I2C with hardware support	*/ | ||||||
|  | #define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/ | ||||||
|  | #define CONFIG_SYS_I2C_SLAVE	0x7F | ||||||
|  | #define CONFIG_SYS_I2C_SPEED	400000 | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Miscellaneous configurable options |  * Miscellaneous configurable options | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | @ -77,7 +77,7 @@ | ||||||
| #define CONFIG_CMD_EEPROM | #define CONFIG_CMD_EEPROM | ||||||
| 
 | 
 | ||||||
| #undef CONFIG_CMD_NET | #undef CONFIG_CMD_NET | ||||||
| 
 | #undef CONFIG_CMD_NFS | ||||||
| 
 | 
 | ||||||
| #undef CONFIG_WATCHDOG			/* watchdog disabled		*/ | #undef CONFIG_WATCHDOG			/* watchdog disabled		*/ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -78,7 +78,7 @@ | ||||||
| #define CONFIG_CMD_EEPROM | #define CONFIG_CMD_EEPROM | ||||||
| 
 | 
 | ||||||
| #undef CONFIG_CMD_NET | #undef CONFIG_CMD_NET | ||||||
| 
 | #undef CONFIG_CMD_NFS | ||||||
| 
 | 
 | ||||||
| #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/ | #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -65,6 +65,7 @@ | ||||||
| #define CONFIG_CMD_EEPROM | #define CONFIG_CMD_EEPROM | ||||||
| 
 | 
 | ||||||
| #undef CONFIG_CMD_NET | #undef CONFIG_CMD_NET | ||||||
|  | #undef CONFIG_CMD_NFS | ||||||
| 
 | 
 | ||||||
| #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/ | #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -88,6 +88,7 @@ | ||||||
| #define CONFIG_CMD_JFFS2 | #define CONFIG_CMD_JFFS2 | ||||||
| 
 | 
 | ||||||
| #undef CONFIG_CMD_NET | #undef CONFIG_CMD_NET | ||||||
|  | #undef CONFIG_CMD_NFS | ||||||
| #undef CONFIG_CMD_RTC | #undef CONFIG_CMD_RTC | ||||||
| #undef CONFIG_CMD_PCI | #undef CONFIG_CMD_PCI | ||||||
| #undef CONFIG_CMD_I2C | #undef CONFIG_CMD_I2C | ||||||
|  | @ -99,6 +100,14 @@ | ||||||
| 
 | 
 | ||||||
| #define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */ | #define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */ | ||||||
| 
 | 
 | ||||||
|  | /*
 | ||||||
|  |  * I2C | ||||||
|  |  */ | ||||||
|  | #define CONFIG_HARD_I2C			/* I2C with hardware support	*/ | ||||||
|  | #define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/ | ||||||
|  | #define CONFIG_SYS_I2C_SLAVE	0x7F | ||||||
|  | #define CONFIG_SYS_I2C_SPEED	400000 | ||||||
|  | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Miscellaneous configurable options |  * Miscellaneous configurable options | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | @ -518,7 +518,7 @@ | ||||||
| 
 | 
 | ||||||
| #define CONFIG_SYS_EBC_CFG    0xb84ef000 | #define CONFIG_SYS_EBC_CFG    0xb84ef000 | ||||||
| 
 | 
 | ||||||
| #define CONFIG_SDRAM_BANK0	/* use the standard SDRAM initialization */ | #undef CONFIG_SDRAM_BANK0	/* use private SDRAM initialization */ | ||||||
| #undef CONFIG_SPD_EEPROM | #undef CONFIG_SPD_EEPROM | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0xf8004ffc : |   .resetvec 0xf8004ffc : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   .text      : |   .text      : | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0x00800FFC : |   .resetvec 0x00800FFC : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   .text      : |   .text      : | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0xE3003FFC : |   .resetvec 0xE3003FFC : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   .text      : |   .text      : | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0x00800FFC : |   .resetvec 0x00800FFC : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   .text      : |   .text      : | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| /* | /* | ||||||
|  * (C) Copyright 2006 |  * (C) Copyright 2006-2010 | ||||||
|  * Stefan Roese, DENX Software Engineering, sr@denx.de. |  * Stefan Roese, DENX Software Engineering, sr@denx.de. | ||||||
|  * |  * | ||||||
|  * See file CREDITS for list of people who contributed to this |  * See file CREDITS for list of people who contributed to this | ||||||
|  | @ -26,7 +26,7 @@ SECTIONS | ||||||
| { | { | ||||||
|   .resetvec 0xE0013FFC : |   .resetvec 0xE0013FFC : | ||||||
|   { |   { | ||||||
|     *(.resetvec) |     KEEP(*(.resetvec)) | ||||||
|   } = 0xffff |   } = 0xffff | ||||||
| 
 | 
 | ||||||
|   .text      : |   .text      : | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue