QNX MIPS Support

Jeff Baker jbaker@qnx.com
Mon Jul 19 15:46:00 GMT 2004


I have our MIPS support working in the current head branch binutils.  It 
ain't pretty but it works.  Now my task is to try and clean the patch up 
for submission.  My first questions are these:

1)  We have many places where we've made changes that would effect every 
other target as well.  Is the correct want to handle this the same way 
that Irix is handled?  I.e. with a QNX_COMPAT macro and an if statement?

2)  We've added some code to '_bfd_mips_elf_adjust_dynamic_symbol'.  In 
2.12.1 (our current shipping version) this code was called before the 
first call to 'mips_elf_sort_hash_table', which was made from 
'_bfd_mips_elf_size_dynamic_sections'.  In the current head branch the 
call to 'mips_elf_sort_hash_table' was moved from there to 
'_bfd_mips_elf_always_size_sections' which is called before our code is 
executed.  The ultimate result of this is that we end up with a null 
global_gotsym and lose a load of our global symbols.  I pasted my printf 
debugging output below to illustrate what I'm trying to say.  I was 
wondering if anyone can explain why this code was moved and how I should 
be dealing with it now.

Here is the debugging output.  Lines like 
'_bfd_mips_elf_adjust_dynamic_symbol: s->rawsize (0), s->size (0)' 
represent our modifications being executed.


2.12.1
======================================================
FUNCTION: _bfd_mips_elf_always_size_sections
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
_bfd_mips_elf_adjust_dynamic_symbol: s->rawsize (0), s->size (0)
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
_bfd_mips_elf_adjust_dynamic_symbol: s->rawsize (4), s->size (4)
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_size_dynamic_sections
_bfd_mips_elf_size_dynamic_sections calling mips_elf_sort_hash_table
FUNCTION: mips_elf_sort_hash_table
mips_elf_sort_hash_table: hsd.low (a04f9d0)
FUNCTION: _bfd_mips_elf_final_link
_bfd_mips_elf_final_link calling mips_elf_sort_hash_table
FUNCTION: mips_elf_sort_hash_table
mips_elf_sort_hash_table: hsd.low (a04f9d0)
======================================================

2.15.91
======================================================
FUNCTION: _bfd_mips_elf_always_size_sections
_bfd_mips_elf_always_size_sections: Calling mips_elf_sort_hash_table
FUNCTION: mips_elf_sort_hash_table
mips_elf_sort_hash_table: hsd.low (0)
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
_bfd_mips_elf_adjust_dynamic_symbol: s->rawsize (0), s->size (0)
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
_bfd_mips_elf_adjust_dynamic_symbol: s->rawsize (4), s->size (4)
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_adjust_dynamic_symbol
FUNCTION: _bfd_mips_elf_final_link
_bfd_mips_elf_final_link: About to call mips_elf_sort_hash_table
FUNCTION: mips_elf_sort_hash_table
mips_elf_sort_hash_table: hsd.low (a04e808)
======================================================



More information about the Binutils mailing list