[NSWI004] memset missing reference

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Tue Oct 13 14:32:44 CEST 2020


Hi,

in some situations, GCC generates code that assumes `memset` is 
available (from the doc: GCC requires the freestanding environment 
provide memcpy, memmove, memset and memcmp).

Probably the easiest workaround is to implement `memset` yourself, since 
there is no need to make it super efficient it should be trivial.

Petr


On 13/10/2020 14:23, Jura Pelc wrote:
> I've got the following error in the pipeline, but on local and nswi004 
> suite_a01_base.txt passed.
> 
> [2020-10-13 12:05:20,617 K/printk/uint DEBUG] [make] src/lib/print.o: In 
> function `print_hex':
> [2020-10-13 12:05:20,617 K/printk/uint DEBUG] [make] (.text+0xac): 
> undefined reference to `memset'
> [2020-10-13 12:05:20,617 K/printk/uint DEBUG] [make] src/lib/print.o: In 
> function `print_int':
> [2020-10-13 12:05:20,617 K/printk/uint DEBUG] [make] (.text+0x178): 
> undefined reference to `memset'
> 
> But I do not use `memset` directly in code. Only think is static array 
> allocation
> 
> chartext[] = { 0, 0, 0, 0 ...
> 
> Has anyone any clue what is wrong here?
> 
> 
> -- 
> 
> S pozdravem Jiří Pelc
> Matematicko-fyzikální fakulta
> Univerzita Karlova
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 

-- 
Petr Tuma
Distributed and Dependable Systems
Faculty of Mathematics and Physics
Charles University, Czech Republic
       http://d3s.mff.cuni.cz


More information about the NSWI004 mailing list