diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1996-09-09 22:59:40 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1996-09-09 22:59:40 +0000 |
commit | f0c12b73402e181fed2ac4e3911f8754004d08e6 (patch) | |
tree | 8c6a4edbbc2c985f743c08cac72d7f29e9a7096f /bfd/elf.c | |
parent | 2254cd90a9ce9460303b2585574b4bb219142bf4 (diff) | |
download | gdb-f0c12b73402e181fed2ac4e3911f8754004d08e6.zip gdb-f0c12b73402e181fed2ac4e3911f8754004d08e6.tar.gz gdb-f0c12b73402e181fed2ac4e3911f8754004d08e6.tar.bz2 |
* config.bfd,configure.in,configure: Add m32r support.
* Makefile.in,archures.c,elf.c,targets.c: Likewise.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 36 |
1 files changed, 29 insertions, 7 deletions
@@ -212,6 +212,15 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) || strncmp (name, ".stab", sizeof ".stab" - 1) == 0) flags |= SEC_DEBUGGING; + /* As a GNU extension, if the name begins with .gnu.linkonce, we + only link a single copy of the section. This is used to support + g++. g++ will emit each template expansion in its own section. + The symbols will be defined as weak, so that multiple definitions + are permitted. The GNU linker extension is to actually discard + all but one of the sections. */ + if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0) + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + if (! bfd_set_section_flags (abfd, newsect, flags)) return false; @@ -1779,13 +1788,6 @@ map_sections_to_segments (abfd) segment. */ new_segment = true; } - else if ((abfd->flags & D_PAGED) == 0) - { - /* If the file is not demand paged, which means that we - don't require the sections to be correctly aligned in the - file, then there is no other reason for a new segment. */ - new_segment = false; - } else if (BFD_ALIGN (last_hdr->lma + last_hdr->_raw_size, maxpagesize) < hdr->lma) { @@ -1793,6 +1795,13 @@ map_sections_to_segments (abfd) skip a page in the segment, then we need a new segment. */ new_segment = true; } + else if ((abfd->flags & D_PAGED) == 0) + { + /* If the file is not demand paged, which means that we + don't require the sections to be correctly aligned in the + file, then there is no other reason for a new segment. */ + new_segment = false; + } else if ((last_hdr->flags & SEC_LOAD) == 0 && (hdr->flags & SEC_LOAD) != 0) { @@ -2487,16 +2496,29 @@ prep_headers (abfd) case bfd_arch_alpha: i_ehdrp->e_machine = EM_ALPHA; break; + case bfd_arch_sh: + i_ehdrp->e_machine = EM_SH; + break; /* start-sanitize-d10v */ case bfd_arch_d10v: i_ehdrp->e_machine = EM_CYGNUS_D10V; break; /* end-sanitize-d10v */ +/* start-sanitize-v850 */ + case bfd_arch_v850: + i_ehdrp->e_machine = EM_CYGNUS_V850; + break; +/* end-sanitize-v850 */ /* start-sanitize-arc */ case bfd_arch_arc: i_ehdrp->e_machine = EM_CYGNUS_ARC; break; /* end-sanitize-arc */ +/* start-sanitize-m32r */ + case bfd_arch_m32r: + i_ehdrp->e_machine = EM_CYGNUS_M32R; + break; +/* end-sanitize-m32r */ /* also note that EM_M32, AT&T WE32100 is unknown to bfd */ default: i_ehdrp->e_machine = EM_NONE; |