mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-24 05:40:09 +00:00
Fix bug in calcrom
This commit is contained in:
parent
2406b19f9a
commit
4627e63760
3
.github/calcrom/Makefile
vendored
3
.github/calcrom/Makefile
vendored
@ -1,5 +1,8 @@
|
||||
CXX := g++
|
||||
CXXFLAGS := -g -O3 -std=c++11
|
||||
ifeq ($(DEBUG),)
|
||||
CXXFLAGS += -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE := .exe
|
||||
|
7
.github/calcrom/calcrom.cpp
vendored
7
.github/calcrom/calcrom.cpp
vendored
@ -122,11 +122,11 @@ void analyze(string& basedir, string& subdir, string& version = default_version)
|
||||
// src asm
|
||||
// data _____|_____
|
||||
// text |
|
||||
unsigned sizes[2][2] = {{0, 0}, {0, 0}};
|
||||
unsigned sizes[2][2] = {{0, 0}, {0, 0x800 /* libsyscall.a */}};
|
||||
|
||||
string srcbase = basedir + (subdir.empty() ? "" : "/" + subdir);
|
||||
string builddir = srcbase + "/build/" + version;
|
||||
string pattern = srcbase + "/{src,asm,lib/{src,asm},lib/*/{src,asm},}/*.{c,s,cpp}";
|
||||
string pattern = srcbase + "/{src,asm,lib/{src,asm},lib/{!syscall}/{src,asm}}/*.{c,s,cpp}";
|
||||
for (char const * & fname : Glob(pattern))
|
||||
{
|
||||
string fname_s(fname);
|
||||
@ -134,6 +134,9 @@ void analyze(string& basedir, string& subdir, string& version = default_version)
|
||||
bool is_asm = ext == ".s";
|
||||
fname_s = fname_s.replace(0, srcbase.size(), builddir);
|
||||
fname_s = fname_s.replace(fname_s.rfind('.'), string::npos, ".o");
|
||||
#ifndef NDEBUG
|
||||
cerr << fname << " --> " << fname_s << endl;
|
||||
#endif
|
||||
|
||||
Elf32File elf(fname_s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user