Bug 649965 - Remove inlines on Elf_*::swap functions. r=tglek
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 03 Jun 2011 01:21:07 +0200
changeset 70474 16035907f7ed9b32909d23d248decbb7b2b07368
parent 70473 790367ac8461b0a2d1671e32e52a1a5f00429b97
child 70475 58b25606c6056bc91ffffca45acdf9b904c42733
push id20335
push usermh@glandium.org
push dateThu, 02 Jun 2011 23:53:11 +0000
treeherdermozilla-central@09aa6c7e5867 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstglek
bugs649965
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 649965 - Remove inlines on Elf_*::swap functions. r=tglek
build/unix/elfhack/elf.cpp
--- a/build/unix/elfhack/elf.cpp
+++ b/build/unix/elfhack/elf.cpp
@@ -36,17 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #undef NDEBUG
 #include <cstring>
 #include <assert.h>
 #include "elfxx.h"
 
 template <class endian, typename R, typename T>
-inline void Elf_Ehdr_Traits::swap(T &t, R &r)
+void Elf_Ehdr_Traits::swap(T &t, R &r)
 {
     memcpy(r.e_ident, t.e_ident, sizeof(r.e_ident));
     r.e_type = endian::swap(t.e_type);
     r.e_machine = endian::swap(t.e_machine);
     r.e_version = endian::swap(t.e_version);
     r.e_entry = endian::swap(t.e_entry);
     r.e_phoff = endian::swap(t.e_phoff);
     r.e_shoff = endian::swap(t.e_shoff);
@@ -55,52 +55,52 @@ inline void Elf_Ehdr_Traits::swap(T &t, 
     r.e_phentsize = endian::swap(t.e_phentsize);
     r.e_phnum = endian::swap(t.e_phnum);
     r.e_shentsize = endian::swap(t.e_shentsize);
     r.e_shnum = endian::swap(t.e_shnum);
     r.e_shstrndx = endian::swap(t.e_shstrndx);
 }
 
 template <class endian, typename R, typename T>
-inline void Elf_Phdr_Traits::swap(T &t, R &r)
+void Elf_Phdr_Traits::swap(T &t, R &r)
 {
     r.p_type = endian::swap(t.p_type);
     r.p_offset = endian::swap(t.p_offset);
     r.p_vaddr = endian::swap(t.p_vaddr);
     r.p_paddr = endian::swap(t.p_paddr);
     r.p_filesz = endian::swap(t.p_filesz);
     r.p_memsz = endian::swap(t.p_memsz);
     r.p_flags = endian::swap(t.p_flags);
     r.p_align = endian::swap(t.p_align);
 }
 
 template <class endian, typename R, typename T>
-inline void Elf_Shdr_Traits::swap(T &t, R &r)
+void Elf_Shdr_Traits::swap(T &t, R &r)
 {
     r.sh_name = endian::swap(t.sh_name);
     r.sh_type = endian::swap(t.sh_type);
     r.sh_flags = endian::swap(t.sh_flags);
     r.sh_addr = endian::swap(t.sh_addr);
     r.sh_offset = endian::swap(t.sh_offset);
     r.sh_size = endian::swap(t.sh_size);
     r.sh_link = endian::swap(t.sh_link);
     r.sh_info = endian::swap(t.sh_info);
     r.sh_addralign = endian::swap(t.sh_addralign);
     r.sh_entsize = endian::swap(t.sh_entsize);
 }
 
 template <class endian, typename R, typename T>
-inline void Elf_Dyn_Traits::swap(T &t, R &r)
+void Elf_Dyn_Traits::swap(T &t, R &r)
 {
     r.d_tag = endian::swap(t.d_tag);
     r.d_un.d_val = endian::swap(t.d_un.d_val);
 }
 
 template <class endian, typename R, typename T>
-inline void Elf_Sym_Traits::swap(T &t, R &r)
+void Elf_Sym_Traits::swap(T &t, R &r)
 {
     r.st_name = endian::swap(t.st_name);
     r.st_value = endian::swap(t.st_value);
     r.st_size = endian::swap(t.st_size);
     r.st_info = t.st_info;
     r.st_other = t.st_other;
     r.st_shndx = endian::swap(t.st_shndx);
 }
@@ -113,24 +113,24 @@ struct _Rel_info {
         r = endian::swap(ELF32_R_INFO(ELF64_R_SYM(t), ELF64_R_TYPE(t)));
     }
     static inline void swap(Elf32_Word &t, Elf64_Xword &r) {
         r = endian::swap(ELF64_R_INFO(ELF32_R_SYM(t), ELF32_R_TYPE(t)));
     }
 };
 
 template <class endian, typename R, typename T>
-inline void Elf_Rel_Traits::swap(T &t, R &r)
+void Elf_Rel_Traits::swap(T &t, R &r)
 {
     r.r_offset = endian::swap(t.r_offset);
     _Rel_info<endian>::swap(t.r_info, r.r_info);
 }
 
 template <class endian, typename R, typename T>
-inline void Elf_Rela_Traits::swap(T &t, R &r)
+void Elf_Rela_Traits::swap(T &t, R &r)
 {
     r.r_offset = endian::swap(t.r_offset);
     _Rel_info<endian>::swap(t.r_info, r.r_info);
     r.r_addend = endian::swap(t.r_addend);
 }
 
 static const Elf32_Shdr null32_section =
     { 0, SHT_NULL, 0, 0, 0, 0, SHN_UNDEF, 0, 0, 0 };