elf_object.cc (5616:05fd71ca96db) | elf_object.cc (5759:6e65ac8a2c80) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 277 unchanged lines hidden (view full) --- 286 text.size = phdr.p_filesz; 287 text.fileImage = fileData + phdr.p_offset; 288 } else if (phdr.p_vaddr <= dataSecStart && 289 phdr.p_vaddr + phdr.p_filesz > dataSecStart) { 290 data.baseAddr = phdr.p_paddr; 291 data.size = phdr.p_filesz; 292 data.fileImage = fileData + phdr.p_offset; 293 } else { | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 277 unchanged lines hidden (view full) --- 286 text.size = phdr.p_filesz; 287 text.fileImage = fileData + phdr.p_offset; 288 } else if (phdr.p_vaddr <= dataSecStart && 289 phdr.p_vaddr + phdr.p_filesz > dataSecStart) { 290 data.baseAddr = phdr.p_paddr; 291 data.size = phdr.p_filesz; 292 data.fileImage = fileData + phdr.p_offset; 293 } else { |
294 // If it's none of the above but is loadable, 295 // load the filesize worth of data |
|
294 Segment extra; 295 extra.baseAddr = phdr.p_paddr; 296 extra.size = phdr.p_filesz; 297 extra.fileImage = fileData + phdr.p_offset; 298 extraSegments.push_back(extra); 299 } 300 } 301 --- 141 unchanged lines hidden --- | 296 Segment extra; 297 extra.baseAddr = phdr.p_paddr; 298 extra.size = phdr.p_filesz; 299 extra.fileImage = fileData + phdr.p_offset; 300 extraSegments.push_back(extra); 301 } 302 } 303 --- 141 unchanged lines hidden --- |