Hi,

In fact, i would prefer to use linker script to solve this problem.
Linker script direct the link process, you can combine the sections in
any way you want. For example, the following linker script:

SECTIONS
     {
       .=0x8000
       .text :
       {
         *(.text)
       }
     }

should only copy .text section to the output expectable.

To use the linker script:

ld -T my_script ...

I use this method to solve a problem in the cygwin ld. Its default
linker script create __CTOR_LIST__ and __DTOR_LIST__ variable at the
end of the text section, so it can't get the length right. After using
the new linker script, I'm able to create the exact content that I
want.

-- 
Bean


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to