Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit bcff7cc

Browse files
committed
linker: don't abbreviate "offset".
Change-Id: Ie5b2044cacf3b601940ce23ae9b2148a90d62679
1 parent 4c5fe98 commit bcff7cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

linker/linker_phdr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,19 +347,19 @@ bool ElfReader::CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment)
347347
((offset % alignment) == 0);
348348
}
349349

350-
void* ElfReader::MapData(MappedFileFragment* fragment, off64_t offs, off64_t size) {
350+
void* ElfReader::MapData(MappedFileFragment* fragment, off64_t offset, off64_t size) {
351351
off64_t end;
352-
CHECK(safe_add(&end, offs, size));
352+
CHECK(safe_add(&end, offset, size));
353353

354354
// If the data is already mapped just return it
355355
if (static_cast<off64_t>(file_fragment_.size()) >= end) {
356-
return static_cast<char*>(file_fragment_.data()) + offs;
356+
return static_cast<char*>(file_fragment_.data()) + offset;
357357
}
358358
// Use the passed-in fragment if area is not mapped. We can't remap the original fragment
359359
// because that invalidates all previous pointers if the file is remapped to a different
360360
// virtual address. A local variable can't be used in place of the passed-in fragment because
361361
// the area would be unmapped as soon as the local object goes out of scope.
362-
if (fragment->Map(fd_, file_offset_, offs, size)) {
362+
if (fragment->Map(fd_, file_offset_, offset, size)) {
363363
return fragment->data();
364364
}
365365
return nullptr;

linker/linker_phdr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class ElfReader {
7373
[[nodiscard]] bool FindGnuPropertySection();
7474
[[nodiscard]] bool CheckPhdr(ElfW(Addr));
7575
[[nodiscard]] bool CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment);
76-
[[nodiscard]] void* MapData(MappedFileFragment* fragment, off64_t offs, off64_t size);
76+
[[nodiscard]] void* MapData(MappedFileFragment* fragment, off64_t offset, off64_t size);
7777

7878
bool did_read_;
7979
bool did_load_;

0 commit comments

Comments
 (0)