1. 08 Dec, 2010 1 commit
  2. 19 Oct, 2010 1 commit
    • Russ Cox's avatar
      5l, 6l, 8l: link pclntab and symtab as ordinary rodata symbols · 19fd5c78
      Russ Cox authored
      That is, move the pc/ln table and the symbol table
      into the read-only data segment.  This eliminates
      the need for a special load command to map the
      symbol table into memory, which makes the
      information available on systems that couldn't handle
      the magic load to 0x99000000, like NaCl and ARM QEMU
      and Linux without config_highmem=y.  It also
      eliminates an #ifdef and some clumsy code to
      find the symbol table on Windows.
      
      The bad news is that the binary appears to be bigger
      than it used to be.  This is not actually the case, though:
      the same amount of data is being mapped into memory
      as before, and the tables are still read-only, so they're
      still shared across multiple instances of the binary as
      they were before.  The difference is just that the tables
      aren't squirreled away in some section that "size" doesn't
      know to look at.
      
      This is a checkpoint.
      It probably breaks Windows and breaks NaCl more
      than it used to be broken, but those will be fixed.
      The logic involving -s needs to be revisited too.
      
      Fixes #871.
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/2587041
      19fd5c78
  3. 15 Oct, 2010 1 commit
    • Russ Cox's avatar
      5l, 6l, 8l: accumulate data image during import · be2c2120
      Russ Cox authored
      Using explicit relocations internally, we can
      represent the data for a particular symbol as
      an initialized block of memory instead of a
      linked list of ADATA instructions.  The real
      goal here is to be able to hand off some of the
      relocations to the dynamic linker when interacting
      with system libraries, but a pleasant side effect is
      that the memory image is much more compact
      than the ADATA list, so the linkers use less memory.
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/2512041
      be2c2120
  4. 13 Oct, 2010 2 commits
    • Russ Cox's avatar
      various: avoid %ld etc · d9c989fa
      Russ Cox authored
      The Plan 9 tools assume that long is 32 bits.
      We converted all instances of long to int32 when
      importing the code but missed the print formats.
      Because int32 is always int on the compilers we use,
      it is never correct to use %lux, %ld, etc.  Convert to %ux, %d, etc.
      
      (It matters because on 64-bit gcc, long is 64 bits,
      so we were printing 32-bit quantities with 64-bit formats.)
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/2491041
      d9c989fa
    • Russ Cox's avatar
      5l, 6l, 8l: first pass cleanup · 085be174
      Russ Cox authored
      * Maintain Sym* list for text with individual
        prog lists instead of using one huge list and
        overloading p->pcond.
      * Comment what each file is for.
      * Move some output code from span.c to asm.c.
      * Move profiling into prof.c, symbol table into symtab.c.
      * Move mkfwd to ld/lib.c.
      * Throw away dhog dynamic loading code.
      * Throw away Alef become.
      * Fix printing of WORD instructions in 5l -a.
      
      Goal here is to be able to handle each piece of text or data
      as a separate piece, both to make it easier to load the
      occasional .o file and also to make it possible to split the
      work across multiple threads.
      
      R=ken2, r, ken3
      CC=golang-dev
      https://golang.org/cl/2335043
      085be174