Fix errors detected by "make run-testsuite".

total_out does not matter when option -t writes no output file.
Subtle error in generateElfHdr() [noted by address sanitizer].
New member function is_LOAD32() to avoid confusion with (1+ LO_PROC).
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
This commit is contained in:
John Reiser
2021-03-06 15:31:56 -08:00
committed by Markus F.X.J. Oberhumer
parent baa9090198
commit 0a69e7803b
2 changed files with 40 additions and 29 deletions
+1
View File
@@ -162,6 +162,7 @@ protected:
Elf32_Phdr const *elf_find_ptype(unsigned type, Elf32_Phdr const *phdr0, unsigned phnum);
Elf32_Shdr const *elf_find_section_name(char const *) const;
Elf32_Shdr const *elf_find_section_type(unsigned) const;
int is_LOAD32(Elf32_Phdr const *phdr) const; // beware confusion with (1+ LO_PROC)
unsigned check_pt_load(Elf32_Phdr const *);
unsigned check_pt_dynamic(Elf32_Phdr const *);
void invert_pt_dynamic(Elf32_Dyn const *, unsigned dt_filesz);