forked from KolibriOS/kolibrios
[clink] Small fixes for GCC (rev. cbd306345347fae28f12fa7f79960403d19e216e)
git-svn-id: svn://kolibrios.org@9085 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
188a8f0370
commit
451b859916
@ -1,3 +1,4 @@
|
|||||||
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -120,7 +121,7 @@ typedef struct {
|
|||||||
|
|
||||||
static int emit_logs;
|
static int emit_logs;
|
||||||
|
|
||||||
static int log_info(const char *fmt, ...) {
|
static void log_info(const char *fmt, ...) {
|
||||||
if (emit_logs) {
|
if (emit_logs) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
@ -421,7 +422,7 @@ static void build(ObjectIr *ir, const char *outname) {
|
|||||||
sym.sym.symbol.SectionNumber = get_section_number(&ir->section_names_set, sec_name);
|
sym.sym.symbol.SectionNumber = get_section_number(&ir->section_names_set, sec_name);
|
||||||
|
|
||||||
if (sym.sym.symbol.SectionNumber == 0) {
|
if (sym.sym.symbol.SectionNumber == 0) {
|
||||||
printf("Internal error: %s section is not found in output file");
|
printf("Internal error: %s section is not found in output file", sec_name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,8 +445,8 @@ static void build(ObjectIr *ir, const char *outname) {
|
|||||||
|
|
||||||
// COFF String Table
|
// COFF String Table
|
||||||
log_info("Writing COFF String Table... ");
|
log_info("Writing COFF String Table... ");
|
||||||
fwrite32(out, cvec_pchar_size(&strtab) + 4);
|
fwrite32(out, cvec_char_size(&strtab) + 4);
|
||||||
fwrite(strtab, 1, cvec_pchar_size(&strtab), out);
|
fwrite(strtab, 1, cvec_char_size(&strtab), out);
|
||||||
log_info("Done.\n");
|
log_info("Done.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user