macos: Disable verbose linking output
This commit is contained in:
parent
9ce5b4a691
commit
f2e154e1e5
1 changed files with 32 additions and 26 deletions
10
tccmacho.c
10
tccmacho.c
|
|
@ -17,6 +17,8 @@
|
||||||
*/
|
*/
|
||||||
#include "tcc.h"
|
#include "tcc.h"
|
||||||
|
|
||||||
|
#define DEBUG_MACHO 0
|
||||||
|
|
||||||
struct mach_header {
|
struct mach_header {
|
||||||
uint32_t magic; /* mach magic number identifier */
|
uint32_t magic; /* mach magic number identifier */
|
||||||
int cputype; /* cpu specifier */
|
int cputype; /* cpu specifier */
|
||||||
|
|
@ -373,6 +375,7 @@ static int check_symbols(TCCState *s1, struct macho *mo)
|
||||||
unsigned bind = ELFW(ST_BIND)(sym->st_info);
|
unsigned bind = ELFW(ST_BIND)(sym->st_info);
|
||||||
unsigned vis = ELFW(ST_VISIBILITY)(sym->st_other);
|
unsigned vis = ELFW(ST_VISIBILITY)(sym->st_other);
|
||||||
|
|
||||||
|
if (DEBUG_MACHO)
|
||||||
printf("%4d (%4d): %09llx %4d %4d %4d %3d %s\n",
|
printf("%4d (%4d): %09llx %4d %4d %4d %3d %s\n",
|
||||||
sym_index, elf_index, sym->st_value,
|
sym_index, elf_index, sym->st_value,
|
||||||
type, bind, vis, sym->st_shndx, name);
|
type, bind, vis, sym->st_shndx, name);
|
||||||
|
|
@ -680,14 +683,16 @@ static void collect_sections(TCCState *s1, struct macho *mo)
|
||||||
for (s = mo->sk_to_sect[sk].s; s; s = s->prev) {
|
for (s = mo->sk_to_sect[sk].s; s; s = s->prev) {
|
||||||
al = s->sh_addralign;
|
al = s->sh_addralign;
|
||||||
curaddr = (curaddr + al - 1) & -al;
|
curaddr = (curaddr + al - 1) & -al;
|
||||||
tcc_warning("curaddr now 0x%llx", curaddr);
|
if (DEBUG_MACHO)
|
||||||
|
printf("curaddr now 0x%llx\n", curaddr);
|
||||||
s->sh_addr = curaddr;
|
s->sh_addr = curaddr;
|
||||||
curaddr += s->sh_size;
|
curaddr += s->sh_size;
|
||||||
if (s->sh_type != SHT_NOBITS) {
|
if (s->sh_type != SHT_NOBITS) {
|
||||||
fileofs = (fileofs + al - 1) & -al;
|
fileofs = (fileofs + al - 1) & -al;
|
||||||
s->sh_offset = fileofs;
|
s->sh_offset = fileofs;
|
||||||
fileofs += s->sh_size;
|
fileofs += s->sh_size;
|
||||||
tcc_warning("fileofs now %lld", fileofs);
|
if (DEBUG_MACHO)
|
||||||
|
printf("fileofs now %lld\n", fileofs);
|
||||||
}
|
}
|
||||||
if (sec)
|
if (sec)
|
||||||
mo->elfsectomacho[s->sh_num] = numsec;
|
mo->elfsectomacho[s->sh_num] = numsec;
|
||||||
|
|
@ -695,6 +700,7 @@ static void collect_sections(TCCState *s1, struct macho *mo)
|
||||||
if (sec)
|
if (sec)
|
||||||
sec->size = curaddr - sec->addr;
|
sec->size = curaddr - sec->addr;
|
||||||
}
|
}
|
||||||
|
if (DEBUG_MACHO)
|
||||||
for (s = mo->sk_to_sect[sk].s; s; s = s->prev) {
|
for (s = mo->sk_to_sect[sk].s; s; s = s->prev) {
|
||||||
int type = s->sh_type;
|
int type = s->sh_type;
|
||||||
int flags = s->sh_flags;
|
int flags = s->sh_flags;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue