elf_object.cc (5143:4207b1d8b161) elf_object.cc (5152:20fc3ce35147)
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;

--- 256 unchanged lines hidden (view full) ---

265 phdr.p_paddr + phdr.p_memsz > bssSecStart &&
266 phdr.p_memsz - phdr.p_filesz > 0) {
267 bss.baseAddr = phdr.p_paddr + phdr.p_filesz;
268 bss.size = phdr.p_memsz - phdr.p_filesz;
269 bss.fileImage = NULL;
270 }
271
272 // Check to see if this is the text or data segment
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;

--- 256 unchanged lines hidden (view full) ---

265 phdr.p_paddr + phdr.p_memsz > bssSecStart &&
266 phdr.p_memsz - phdr.p_filesz > 0) {
267 bss.baseAddr = phdr.p_paddr + phdr.p_filesz;
268 bss.size = phdr.p_memsz - phdr.p_filesz;
269 bss.fileImage = NULL;
270 }
271
272 // Check to see if this is the text or data segment
273 if (phdr.p_paddr <= textSecStart &&
274 phdr.p_paddr + phdr.p_filesz > textSecStart) {
273 if (phdr.p_vaddr <= textSecStart &&
274 phdr.p_vaddr + phdr.p_filesz > textSecStart) {
275 text.baseAddr = phdr.p_paddr;
276 text.size = phdr.p_filesz;
277 text.fileImage = fileData + phdr.p_offset;
275 text.baseAddr = phdr.p_paddr;
276 text.size = phdr.p_filesz;
277 text.fileImage = fileData + phdr.p_offset;
278 } else if (phdr.p_paddr <= dataSecStart &&
279 phdr.p_paddr + phdr.p_filesz > dataSecStart) {
278 } else if (phdr.p_vaddr <= dataSecStart &&
279 phdr.p_vaddr + phdr.p_filesz > dataSecStart) {
280 data.baseAddr = phdr.p_paddr;
281 data.size = phdr.p_filesz;
282 data.fileImage = fileData + phdr.p_offset;
283 } else {
284 Segment extra;
285 extra.baseAddr = phdr.p_paddr;
286 extra.size = phdr.p_filesz;
287 extra.fileImage = fileData + phdr.p_offset;

--- 145 unchanged lines hidden ---
280 data.baseAddr = phdr.p_paddr;
281 data.size = phdr.p_filesz;
282 data.fileImage = fileData + phdr.p_offset;
283 } else {
284 Segment extra;
285 extra.baseAddr = phdr.p_paddr;
286 extra.size = phdr.p_filesz;
287 extra.fileImage = fileData + phdr.p_offset;

--- 145 unchanged lines hidden ---