Okay, here's a patch for 2.4.16 to get PPC mostly working.  It still
only compiles up to 'vmlinux' (I'm waiting for a 2.4.17 or 2.4.18-pre
based update to start on the boot stuffs), but should have all of the
nits pointed out before fixed.  It also makes -Wa,-mppc64bridge a
constant extra_aflag (I _think_ I did this part right, but the code
doesn't normally compile in the tree I was trying, so I only saw that
yes indeed head.S got the right flags).

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/8260_io/Makefile.in        Wed Dec 19 16:12:48 2001
@@ -0,0 +1,3 @@
+select(CONFIG_8260 commproc.o uart.o)
+select(CONFIG_8260 CONFIG_FEC_ENET fcc_enet.o)
+select(CONFIG_8260 CONFIG_SCC_ENET enet.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/8xx_io/Makefile.in Wed Dec 19 16:13:03 2001
@@ -0,0 +1,4 @@
+select(CONFIG_8xx commproc.o uart.o)
+select(CONFIG_8xx CONFIG_FEC_ENET fec.o)
+select(CONFIG_8xx CONFIG_SCC_ENET enet.o)
+select(CONFIG_UCODE_PATCH micropatch.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/amiga/Makefile.in  Thu Dec 27 09:28:18 2001
@@ -0,0 +1,5 @@
+expsyms(amiga_ksyms.o)
+
+select(CONFIG_APUS config.o amiints.o cia.o time.o bootinfo.o amisound.o
+       chipram.o amiga_ksyms.o)
+select(CONFIG_AMIGA_PCMCIA pcmcia.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/boot/config.install-2.5    Wed Dec 19 16:10:16 2001
@@ -0,0 +1,34 @@
+mainmenu_name "PPC Installation"
+
+define_bool CONFIG_VMLINUX y
+
+bool 'Use a prefix on install paths' CONFIG_INSTALL_PREFIX
+if [ "$CONFIG_INSTALL_PREFIX" = "y" ]; then
+  string '  Prefix for install paths' CONFIG_INSTALL_PREFIX_NAME ""
+fi
+string 'Where to install the kernel' CONFIG_INSTALL_KERNEL_NAME 
+"/lib/modules/KERNELRELEASE/KERNELBASENAME"
+bool 'Install System.map' CONFIG_INSTALL_SYSTEM_MAP
+if [ "$CONFIG_INSTALL_SYSTEM_MAP" = "y" ]; then
+  string '  Where to install System.map' CONFIG_INSTALL_SYSTEM_MAP_NAME 
+"/lib/modules/KERNELRELEASE/System.map"
+fi
+bool 'Install .config' CONFIG_INSTALL_CONFIG
+if [ "$CONFIG_INSTALL_CONFIG" = "y" ]; then
+  string '  Where to install .config' CONFIG_INSTALL_CONFIG_NAME 
+"/lib/modules/KERNELRELEASE/.config"
+fi
+if [ "$CONFIG_VMLINUX" != "y" ]; then
+  bool '  Install vmlinux for debugging' CONFIG_INSTALL_VMLINUX
+  if [ "$CONFIG_INSTALL_VMLINUX" = "y" ]; then
+    string '    Where to install vmlinux' CONFIG_INSTALL_VMLINUX_NAME 
+"/lib/modules/KERNELRELEASE/vmlinux"
+  fi
+fi
+bool 'Run a post-install script or command' CONFIG_INSTALL_SCRIPT
+if [ "$CONFIG_INSTALL_SCRIPT" = "y" ]; then
+  string '  Post-install script or command name' CONFIG_INSTALL_SCRIPT_NAME ""
+fi
+
+# FIXME: These critical config options should be in arch/$(ARCH)/config.in.  For
+# coexistence of kbuild 2.4 and 2.5 it is easier to put them here, move them
+# later.  KAO
+
+define_string CONFIG_KBUILD_CRITICAL_ARCH_PPC "CONFIG_6xx CONFIG_8xx \
+       CONFIG_4xx CONFIG_ALTIVEC"
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/kernel/Makefile.in Thu Dec 27 09:25:02 2001
@@ -0,0 +1,48 @@
+extra_cflags(pmac_setup.o $(src_includelist /drivers/scsi))
+extra_cflags(prep_setup.o $(src_includelist /drivers/sound))
+
+select($(notdir $(arch_head)))
+
+expsyms(ppc_ksyms.o prep_setup.o time.o)
+
+select(entry.o traps.o irq.o idle.o time.o misc.o process.o signal.o ptrace.o
+       align.o semaphore.o syscalls.o setup.o cputable.o ppc_htab.o)
+
+select(CONFIG_KGDB ppc-stub.o)
+select(CONFIG_MODULES ppc_ksyms.o)
+select(CONFIG_PCI pci.o pci-dma.o)
+select(CONFIG_SMP smp.o)
+select(CONFIG_TAU temp.o)
+
+select(CONFIG_4xx ppc4xx_pic.o)
+select(CONFIG_OAK oak_setup.o)
+select(CONFIG_WALNUT walnut_setup.o)
+select(CONFIG_WALNUT CONFIG_PCI galaxy_pci.o)
+select(CONFIG_6xx l2cr.o)
+select(CONFIG_ALL_PPC pmac_pic.o pmac_setup.o pmac_time.o prom.o feature.o
+       pmac_pci.o chrp_setup.o chrp_time.o chrp_pci.o open_pic.o
+       indirect_pci.o i8259.o prep_pci.o prep_time.o prep_nvram.o
+       prep_setup.o)
+select(CONFIG_ALL_PPC CONFIG_SMP pmac_smp.o chrp_smp.o)
+select(CONFIG_BOOTX_TEXT btext.o)
+select(CONFIG_NVRAM pmac_nvram.o)
+select(CONFIG_PMAC_BACKLIGHT pmac_backlight.o)
+select(CONFIG_PMAC_PBOOK sleep.o)
+select(CONFIG_PPC_RTAS error_log.o proc_rtas.o)
+select(CONFIG_PREP_RESIDUAL residual.o)
+select(CONFIG_APUS apus_setup.o)
+select(CONFIG_APUS CONFIG_PCI apus_pci.o)
+select(CONFIG_GEMINI gemini_prom.o gemini_pci.o gemini_setup.o open_pic.o)
+
+select(CONFIG_8xx m8xx_setup.o ppc8xx_pic.o)
+select(CONFIG_8xx CONFIG_PCI qspan_pci.o)
+select(CONFIG_8xx !CONFIG_MATH_EMULATION softemu8xx.o)
+select(CONFIG_MBX i8259.o)
+select(CONFIG_8260 m8260_setup.o ppc8260_pic.o)
+select(CONFIG_POWER4 xics.o)
+
+uses_asm_offsets(entry.o)
+uses_asm_offsets(misc.o)
+uses_asm_offsets(l2cr.o)
+uses_asm_offsets($(notdir $(arch_head)))
+uses_asm_offsets(gemini_prom.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/lib/Makefile.in    Mon Dec 17 15:02:56 2001
@@ -0,0 +1,4 @@
+expsyms(dec_and_lock.o)
+
+select(checksum.o string.o strcase.o dec_and_lock.o)
+select(CONFIG_SMP locks.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/math-emu/Makefile.in       Thu Dec 27 09:30:33 2001
@@ -0,0 +1,10 @@
+select(math.o fmr.o lfd.o stfd.o)
+select(CONFIG_MATH_EMULATION fabs.o fadd.o fadds.o fcmpo.o fcmpu.o fctiw.o
+                                       fctiwz.o fdiv.o fdivs.o fmadd.o lfs.o
+                                       fmadds.o fmsub.o fmsubs.o fmul.o
+                                       fmuls.o fnabs.o fneg.o types.o fsel.o
+                                       fnmadd.o fnmadds.o fnmsub.o fnmsubs.o
+                                       fres.o frsp.o frsqrte.o fsqrt.o stfs.o
+                                       fsqrts.o fsub.o fsubs.o mcrfs.o mffs.o
+                                       mtfsb0.o mtfsb1.o mtfsf.o mtfsfi.o
+                                       stfiwx.o udivmodti4.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/mm/Makefile.in     Thu Dec 27 10:20:17 2001
@@ -0,0 +1,8 @@
+extra_aflags(hashtable.o $(src_includelist /arch/$(ARCH)/kernel))
+uses_asm_offsets(hashtable.o)
+
+select(fault.o init.o mem_pieces.o extable.o mmu_context.o pgtable.o)
+select(CONFIG_PPC_STD_MMU hashtable.o ppc_mmu.o tlb.o)
+select(CONFIG_PPC_ISERIES iSeries_hashtable.o iSeries_mmu.o tlb.o)
+select(CONFIG_4xx cachemap.o 4xx_mmu.o)
+select(CONFIG_8xx cachemap.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/xmon/Makefile.in   Thu Dec 27 09:31:21 2001
@@ -0,0 +1,3 @@
+select(CONFIG_8xx CONFIG_XMON start_8xx.o)
+select(!CONFIG_8xx CONFIG_XMON start.o)
+select(CONFIG_XMON xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/Makefile.defs.config       Thu Dec 27 09:54:28 2001
@@ -0,0 +1,33 @@
+#
+# arch/$(ARCH)/Makefile.defs.config
+#
+# This file is included by the global makefile so that you can add your own
+# architecture-specific flags.  It should only contain variable settings,
+# any dependencies should be in arch/$(ARCH)/Makefile.in
+#
+# This file contains only values that depend on the config.
+#
+# Do not use ifdef/ifndef, CONFIG_xxx can be defined as 'n'.
+# ifneq ($(subst n,,$(CONFIG_xxx)),) is equivalent to the old
+# ifdef CONFIG_xxx but is CML2 compatible.
+#
+
+
+# We can have any number of 'head.o' files, depending on CPU.
+# So we go ahead and set a default one and then modify it (and
+# CFLAGS) based on what processor we're on.
+arch_head = arch/ppc/kernel/head.o
+
+ifneq ($(subst n,,$(CONFIG_4xx)),)
+  CFLAGS += -Wa,-m405
+  arch_head := arch/ppc/kernel/head_4xx.o
+endif
+
+ifneq ($(subst n,,$(CONFIG_8xx)),)
+  arch_head := arch/ppc/kernel/head_8xx.o
+endif
+
+ifneq ($(subst n,,$(CONFIG_PPC64BRIDGE)),)
+  CFLAGS += -Wa,-mppc64bridge
+  AFLAGS += -Wa,-mppc64bridge
+endif
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/Makefile.defs.noconfig     Wed Dec 19 16:11:46 2001
@@ -0,0 +1,23 @@
+#
+# arch/$(ARCH)/Makefile.defs.noconfig.
+#
+# This file is included by the top level makefile so that you can add your own
+# architecture-specific flags.  It should only contain variable settings,
+# any dependencies should be in arch/$(ARCH)/Makefile.in
+#
+# This file contains only values that do not depend on the config.
+#
+# Note: When this is included by the top level Makefile, not all CFLAGS have been
+#       set.  Some CFLAGS cannot be set until after CROSS_COMPILE is stable, in
+#       particular CC still scans user space includes at this point.
+
+KERNELLOAD             := 0xc0000000
+
+arch_linkflags         := -T arch/ppc/vmlinux.lds.i -Ttext $(KERNELLOAD) -Bstatic
+arch_libs              := arch/$(ARCH)/lib
+arch_drivers_subdirs   := arch/$(ARCH)/8xx_io arch/$(ARCH)/8260_io arch/$(ARCH)/xmon
+
+export KERNELLOAD
+
+CFLAGS +=  -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized \
+               -mmultiple -mstring
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/Makefile.in        Wed Dec 19 14:25:43 2001
@@ -0,0 +1,47 @@
+#
+# Architecture specific dependencies.
+#
+
+link_subdirs(kernel mm math-emu)
+
+extra_aflags(vmlinux.lds.i -Upowerpc -DKERNELLOAD=$(KERNELLOAD) -C -P)
+
+# Convert raw asm offsets into something that can be included as
+# assembler definitions.  It converts
+#   -> symbol $value source
+# into
+#   symbol = value /* 0xvalue source */
+
+user_command(tmp_asm-offsets.h
+       ($(objfile asm-offsets.s))
+       (set -e;
+         (echo "#ifndef __ASM_OFFSETS_H__";
+          echo "#define __ASM_OFFSETS_H__";
+          echo "/*";
+          echo " * DO NOT MODIFY";
+          echo " *";
+          echo " * This file was generated by arch/$(ARCH)/Makefile.in.";
+          echo " *";
+          echo " */";
+          echo "";
+          awk "/^->\$$/{printf(\"\\n\");}
+            /^-> /{
+              sym = \$$2;
+              val = \$$3;
+              sub(/^\\\$$/, \"\", val);
+              \$$1 = \"\";
+              \$$2 = \"\";
+              \$$3 = \"\";
+              printf(\"%-20s = %3d\\t\\t\\t/* 0x%x\\t%s */\\n\",
+                sym, val, val, \$$0)
+            }";
+          echo "";
+          echo "#endif";
+         ) < $< > $@;
+       )
+       ()
+       )
+
+update_if_changed(asm-offsets.h)
+
+CLEAN += $(objfile asm-offsets.s)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/asm-offsets.c      Mon Dec 17 16:55:32 2001
@@ -0,0 +1,117 @@
+/*
+ * Generate definitions needed by assembly language modules.
+ * This code generates raw asm output which is post-processed to extract
+ * and format the required data.
+ */
+
+#include <linux/types.h>
+#include <linux/stddef.h>
+#include <linux/sched.h>
+
+/* Use marker if you need to separate the values later */
+
+#define DEFINE(sym, val, marker) \
+  asm volatile("\n-> " #sym " %0 " #val " " #marker : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+int
+main(void)
+{
+       /*DEFINE(KERNELBASE, KERNELBASE,);*/
+       DEFINE(STATE, offsetof(struct task_struct, state),);
+       DEFINE(NEXT_TASK, offsetof(struct task_struct, next_task),);
+       DEFINE(COUNTER, offsetof(struct task_struct, counter),);
+       DEFINE(PROCESSOR, offsetof(struct task_struct, processor),);
+       DEFINE(SIGPENDING, offsetof(struct task_struct, sigpending),);
+       DEFINE(THREAD, offsetof(struct task_struct, thread),);
+       DEFINE(MM, offsetof(struct task_struct, mm),);
+       DEFINE(ACTIVE_MM, offsetof(struct task_struct, active_mm),);
+       DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct),);
+       DEFINE(KSP, offsetof(struct thread_struct, ksp),);
+       DEFINE(PGDIR, offsetof(struct thread_struct, pgdir),);
+       DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall),);
+       DEFINE(PT_REGS, offsetof(struct thread_struct, regs),);
+       DEFINE(PT_TRACESYS, PT_TRACESYS,);
+       DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags),);
+       DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace),);
+       DEFINE(NEED_RESCHED, offsetof(struct task_struct, need_resched),);
+       DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0]),);
+       DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr),);
+#ifdef CONFIG_ALTIVEC
+       DEFINE(THREAD_VR0, offsetof(struct thread_struct, vr[0]),);
+       DEFINE(THREAD_VRSAVE, offsetof(struct thread_struct, vrsave),);
+       DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr),);
+#endif /* CONFIG_ALTIVEC */
+       /* Interrupt register frame */
+       DEFINE(TASK_UNION_SIZE, sizeof(union task_union),);
+       DEFINE(STACK_FRAME_OVERHEAD, STACK_FRAME_OVERHEAD,);
+       DEFINE(INT_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs),);
+       /* in fact we only use gpr0 - gpr9 and gpr20 - gpr23 */
+       DEFINE(GPR0, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[0]),);
+       DEFINE(GPR1, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[1]),);
+       DEFINE(GPR2, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[2]),);
+       DEFINE(GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[3]),);
+       DEFINE(GPR4, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[4]),);
+       DEFINE(GPR5, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[5]),);
+       DEFINE(GPR6, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[6]),);
+       DEFINE(GPR7, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[7]),);
+       DEFINE(GPR8, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[8]),);
+       DEFINE(GPR9, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[9]),);
+       DEFINE(GPR10, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[10]),);
+       DEFINE(GPR11, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[11]),);
+       DEFINE(GPR12, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[12]),);
+       DEFINE(GPR13, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[13]),);
+       DEFINE(GPR14, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[14]),);
+       DEFINE(GPR15, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[15]),);
+       DEFINE(GPR16, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[16]),);
+       DEFINE(GPR17, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[17]),);
+       DEFINE(GPR18, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[18]),);
+       DEFINE(GPR19, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[19]),);
+       DEFINE(GPR20, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[20]),);
+       DEFINE(GPR21, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[21]),);
+       DEFINE(GPR22, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[22]),);
+       DEFINE(GPR23, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[23]),);
+       DEFINE(GPR24, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[24]),);
+       DEFINE(GPR25, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[25]),);
+       DEFINE(GPR26, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[26]),);
+       DEFINE(GPR27, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[27]),);
+       DEFINE(GPR28, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[28]),);
+       DEFINE(GPR29, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[29]),);
+       DEFINE(GPR30, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[30]),);
+       DEFINE(GPR31, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[31]),);
+       /* Note: these symbols include _ because they overlap with special
+        * register names
+        */
+       DEFINE(_NIP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, nip),);
+       DEFINE(_MSR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, msr),);
+       DEFINE(_CTR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, ctr),);
+       DEFINE(_LINK, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, link),);
+       DEFINE(_CCR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, ccr),);
+       DEFINE(_MQ, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, mq),);
+       DEFINE(_XER, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, xer),);
+       DEFINE(_DAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar),);
+       DEFINE(_DSISR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr),);
+       /* The PowerPC 400-class processors have neither the DAR nor the DSISR
+        * SPRs. Hence, we overload them to hold the similar DEAR and ESR SPRs
+        * for such processors.
+        */
+       DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar),);
+       DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr),);
+       DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3),);
+       DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result),);
+       DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap),);
+       DEFINE(CLONE_VM, CLONE_VM,);
+       DEFINE(MM_PGD, offsetof(struct mm_struct, pgd),);
+
+       /* About the CPU features table */
+       DEFINE(CPU_SPEC_ENTRY_SIZE, sizeof(struct cpu_spec),);
+       DEFINE(CPU_SPEC_PVR_MASK, offsetof(struct cpu_spec, pvr_mask),);
+       DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value),);
+       DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features),);
+       DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup),);
+
+       DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28,);
+       BLANK();
+       return 0;
+}
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/vmlinux.lds.S      Wed Dec 19 14:32:09 2001
@@ -0,0 +1,152 @@
+OUTPUT_ARCH(powerpc)
+#if 0
+SEARCH_DIR(/lib);
+SEARCH_DIR(/usr/lib);
+SEARCH_DIR(/usr/local/lib);
+SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
+#endif
+
+SECTIONS
+{
+  . = KERNELLOAD;
+  _text = .;
+  /* Read-only sections, merged into text segment: */
+#if 0
+  . = + SIZEOF_HEADERS;
+#endif
+  .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)        } =0*/
+  .plt : { *(.plt) }
+  .text      :
+  {
+    *(.text)
+    *(.fixup)
+    *(.got1)
+  }
+  _etext = .;
+  PROVIDE (etext = .);
+  .rodata    :
+  {
+    *(.rodata)
+    *(.rodata.*)
+    *(.rodata1)
+  }
+  .kstrtab   : { *(.kstrtab) }
+  .fini      : { *(.fini)    } =0
+  .ctors     : { *(.ctors)   }
+  .dtors     : { *(.dtors)   }
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x0FFF) & 0xFFFFF000;
+  .data    :
+  {
+    *(.data)
+    *(.data1)
+    *(.sdata)
+    *(.sdata2)
+    *(.got.plt) *(.got)
+    *(.dynamic)
+    CONSTRUCTORS
+  }
+  _edata  =  .;
+  PROVIDE (edata = .);
+
+  .fixup   : { *(.fixup) }
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  __start___ksymtab = .;       /* Kernel symbol table */
+  __ksymtab : { *(__ksymtab) }
+  __stop___ksymtab = .;
+
+  __start___kallsyms = .;      /* All kernel symbols */
+  __kallsyms : { *(__kallsyms) }
+  __stop___kallsyms = .;
+
+  __start___ftr_fixup = .;
+  __ftr_fixup : { *(__ftr_fixup) }
+  __stop___ftr_fixup = .;
+
+  . = ALIGN(32);
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  . = ALIGN(4096);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { 
+    *(.data.init);
+    __vtop_table_begin = .;
+    *(.vtop_fixup);
+    __vtop_table_end = .;
+    __ptov_table_begin = .;
+    *(.ptov_fixup);
+    __ptov_table_end = .;
+  }
+  . = ALIGN(16);
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
+  __initcall_start = .;
+  .initcall.init : { *(.initcall.init) }
+  __initcall_end = .;
+  . = ALIGN(4096);
+  __init_end = .;
+
+  . = ALIGN(4096);
+  __pmac_begin = .;
+  .text.pmac : { *(.text.pmac) }
+  .data.pmac : { *(.data.pmac) }
+  . = ALIGN(4096);
+  __pmac_end = .;
+
+  . = ALIGN(4096);
+  __prep_begin = .;
+  .text.prep : { *(.text.prep) }
+  .data.prep : { *(.data.prep) }
+  . = ALIGN(4096);
+  __prep_end = .;
+
+  . = ALIGN(4096);
+  __chrp_begin = .;
+  .text.chrp : { *(.text.chrp) }
+  .data.chrp : { *(.data.chrp) }
+  . = ALIGN(4096);
+  __chrp_end = .;
+
+  . = ALIGN(4096);
+  __openfirmware_begin = .;
+  .text.openfirmware : { *(.text.openfirmware) }
+  .data.openfirmware : { *(.data.openfirmware) }
+  . = ALIGN(4096);
+  __openfirmware_end = .;
+
+  __bss_start = .;
+  .bss       :
+  {
+   *(.sbss) *(.scommon)
+   *(.dynbss)
+   *(.bss)
+   *(COMMON)
+  }
+  _end = . ;
+  PROVIDE (end = .);
+}

_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to