0

How do I change the base address in GCC like in assembly if you would do:

org <address>

I’m compiling the source into an object and then use "objcopy" to get only the .text field out of it and put it into a binary file to execute (I’m creating a C kernel).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
SeeSoftware
  • 531
  • 6
  • 17

1 Answers1

0

You have to specify a linker script to a linker in order to make a custom sections layout. Check with binutils documentation at the SourceWare site.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Serge
  • 6,088
  • 17
  • 27