소스 검색

rename __simple_malloc.c to lite_malloc.c - yes this affects behavior!

why does this affect behavior? well, the linker seems to traverse
archive files starting from its current position when resolving
symbols. since calloc.c comes alphabetically (and thus in sequence in
the archive file) between __simple_malloc.c and malloc.c, attempts to
resolve the "malloc" symbol for use by calloc.c were pulling in the
full malloc.c implementation rather than the __simple_malloc.c
implementation.

as of now, lite_malloc.c and malloc.c are adjacent in the archive and
in the correct order, so malloc.c should never be used to resolve
"malloc" unless it's already needed to resolve another symbol ("free"
or "realloc").
Rich Felker 14 년 전
부모
커밋
620a134638
1개의 변경된 파일0개의 추가작업 그리고 0개의 파일을 삭제
  1. 0 0
      src/malloc/lite_malloc.c

+ 0 - 0
src/malloc/__simple_malloc.c → src/malloc/lite_malloc.c