title: symbol table and relocation table in object file
body: <p>From what I understand, instructions and data in an object file all have addresses. First data item start at address 0 and first instruction also start at address 0. </p>
  
  <p>The relocation table contains information about instructions that need to be updated if the addresses in the file change, for example if the file is linked together with another. Line A, in the example below, would be in the relocation table. I don't think B would be in the relocation table, since the address of label "equal" is relative to B. Are these correct assumptions?</p>
  
  <p>I know the symbol table show the labels the file have and also labels that haven't been resolved. But what other information does the symbol table contain?</p>
  
  <p>Also, when the assembler translates the instructions to binary, what is placed in those instructions that have unresolved references?. B in this example. </p>
  
  <pre><code>.data
  TEXT: .asciiz "Foo"
  
  .text
  .global main
  main:
       li t0, 1
       beq t0, 1, equal #B
  
  equal:
      la a0, TEXT
      jal printf #A
  </code></pre>