Cleanups.
This commit is contained in:
@@ -55,8 +55,13 @@
|
|||||||
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
|
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
|
||||||
ACC_COMPILE_TIME_ASSERT_HEADER((1u << 31) << 1 == 0)
|
ACC_COMPILE_TIME_ASSERT_HEADER((1u << 31) << 1 == 0)
|
||||||
ACC_COMPILE_TIME_ASSERT_HEADER(((int)(1u << 31)) >> 31 == -1) // arithmetic right shift
|
ACC_COMPILE_TIME_ASSERT_HEADER(((int)(1u << 31)) >> 31 == -1) // arithmetic right shift
|
||||||
|
ACC_COMPILE_TIME_ASSERT_HEADER(CHAR_MAX == 255) // -funsigned-char
|
||||||
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) > 0) // -funsigned-char
|
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) > 0) // -funsigned-char
|
||||||
|
|
||||||
|
#if (ACC_CC_MSC)
|
||||||
|
# pragma warning(error: 4319)
|
||||||
|
#endif
|
||||||
|
|
||||||
// FIXME - quick hack for arm-wince-gcc-3.4 (Debian pocketpc-*.deb packages)
|
// FIXME - quick hack for arm-wince-gcc-3.4 (Debian pocketpc-*.deb packages)
|
||||||
#if 1 && (ACC_ARCH_ARM) && defined(__pe__) && !defined(__CEGCC__) && !defined(_WIN32)
|
#if 1 && (ACC_ARCH_ARM) && defined(__pe__) && !defined(__CEGCC__) && !defined(_WIN32)
|
||||||
# undef HAVE_CHMOD
|
# undef HAVE_CHMOD
|
||||||
|
|||||||
+3
-3
@@ -207,7 +207,7 @@ void ElfLinker::init(const void *pdata_v, int plen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElfLinker::preprocessSections(char *start, char const *end)
|
void ElfLinker::preprocessSections(char *start, char *end)
|
||||||
{
|
{
|
||||||
char *nextl;
|
char *nextl;
|
||||||
for (nsections = 0; start < end; start = 1+ nextl)
|
for (nsections = 0; start < end; start = 1+ nextl)
|
||||||
@@ -233,7 +233,7 @@ void ElfLinker::preprocessSections(char *start, char const *end)
|
|||||||
addSection("*UND*", NULL, 0, 0);
|
addSection("*UND*", NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElfLinker::preprocessSymbols(char *start, char const *end)
|
void ElfLinker::preprocessSymbols(char *start, char *end)
|
||||||
{
|
{
|
||||||
char *nextl;
|
char *nextl;
|
||||||
for (nsymbols = 0; start < end; start = 1+ nextl)
|
for (nsymbols = 0; start < end; start = 1+ nextl)
|
||||||
@@ -273,7 +273,7 @@ void ElfLinker::preprocessSymbols(char *start, char const *end)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElfLinker::preprocessRelocations(char *start, char const *end)
|
void ElfLinker::preprocessRelocations(char *start, char *end)
|
||||||
{
|
{
|
||||||
Section *section = NULL;
|
Section *section = NULL;
|
||||||
char *nextl;
|
char *nextl;
|
||||||
|
|||||||
+3
-3
@@ -66,9 +66,9 @@ protected:
|
|||||||
bool reloc_done;
|
bool reloc_done;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void preprocessSections(char *start, char const *end);
|
void preprocessSections(char *start, char *end);
|
||||||
void preprocessSymbols(char *start, char const *end);
|
void preprocessSymbols(char *start, char *end);
|
||||||
void preprocessRelocations(char *start, char const *end);
|
void preprocessRelocations(char *start, char *end);
|
||||||
Section *findSection(const char *name, bool fatal=true) const;
|
Section *findSection(const char *name, bool fatal=true) const;
|
||||||
Symbol *findSymbol(const char *name, bool fatal=true) const;
|
Symbol *findSymbol(const char *name, bool fatal=true) const;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1666,7 +1666,7 @@ int PackMachBase<T>::canUnpack()
|
|||||||
}
|
}
|
||||||
if (!strcmp("__LINKEDIT", segptr->segname)) {
|
if (!strcmp("__LINKEDIT", segptr->segname)) {
|
||||||
offLINK = segptr->fileoff;
|
offLINK = segptr->fileoff;
|
||||||
if (offLINK < pos_next) {
|
if (offLINK < (off_t) pos_next) {
|
||||||
offLINK = pos_next;
|
offLINK = pos_next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user