Cleanups.

This commit is contained in:
Markus F.X.J. Oberhumer 2016-11-20 13:16:19 +01:00
parent 33a51e69bf
commit 8d61e037f9
4 changed files with 12 additions and 7 deletions

View File

@ -55,8 +55,13 @@
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
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(CHAR_MAX == 255) // -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)
#if 1 && (ACC_ARCH_ARM) && defined(__pe__) && !defined(__CEGCC__) && !defined(_WIN32)
# undef HAVE_CHMOD

View File

@ -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;
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);
}
void ElfLinker::preprocessSymbols(char *start, char const *end)
void ElfLinker::preprocessSymbols(char *start, char *end)
{
char *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;
char *nextl;

View File

@ -66,9 +66,9 @@ protected:
bool reloc_done;
protected:
void preprocessSections(char *start, char const *end);
void preprocessSymbols(char *start, char const *end);
void preprocessRelocations(char *start, char const *end);
void preprocessSections(char *start, char *end);
void preprocessSymbols(char *start, char *end);
void preprocessRelocations(char *start, char *end);
Section *findSection(const char *name, bool fatal=true) const;
Symbol *findSymbol(const char *name, bool fatal=true) const;

View File

@ -1666,7 +1666,7 @@ int PackMachBase<T>::canUnpack()
}
if (!strcmp("__LINKEDIT", segptr->segname)) {
offLINK = segptr->fileoff;
if (offLINK < pos_next) {
if (offLINK < (off_t) pos_next) {
offLINK = pos_next;
}
}