Getting rid of a lot of redundant code to set ELF machine codes
Alexandre Oliva
aoliva@redhat.com
Wed Sep 12 16:50:00 GMT 2001
The other day, I asked myself why the heck there was that long switch
statement in bfd/elf.c:prep_headers(), if all the information was
already available in machine-specific #define ELF_MACHINE_CODE. I
couldn't find an answer. I asked Nick, and he suspected it was just
historical junk, so I went ahead and got rid of it.
While I was at it, I noticed that some of the machines for which
EM_CYGNUS_* numbers were picked at random have now (or a long time
ago) gained official numbers, so I went ahead and introduced the new
numbers, but kept the old ones as aliases. I removed EM_CYGNUS_ARC,
since it has not been used for ages. I was tempted to remove EM_PJ
(now EM_PJ_OLD) too, since the official EM numbers are getting close
to the number that was originally assigned to it, but I ended up
leaving it in.
This was tested against the CVS version of a few weeks ago, with
--enable-targets=all, but I only got to post it now. I couldn't
retest it again today because ld/eelf64lppc.o appears to be broken:
eelf64ppc.o: In function `gldelf64ppc_find_exp_assignment':
eelf64ppc.o(.text+0xa98): undefined reference to `bfd_elf64_record_link_assignment'
eelf64ppc.o: In function `gldelf64ppc_before_allocation':
eelf64ppc.o(.text+0xbc7): undefined reference to `bfd_elf64_size_dynamic_sections'
eelf64lppc.o: In function `gldelf64lppc_find_exp_assignment':
eelf64lppc.o(.text+0xa98): undefined reference to `bfd_elf64_record_link_assignment'
eelf64lppc.o: In function `gldelf64lppc_before_allocation':
eelf64lppc.o(.text+0xbc7): undefined reference to `bfd_elf64_size_dynamic_sections'
collect2: ld returned 1 exit status
make[3]: *** [ld-new] Error 1
The patch was pre-approved by Nick Clifton. I'm checking it in.
More information about the Binutils
mailing list