mapped helpful functions requiring libgcc.a

David Woodhouse David.Woodhouse at mvhi.com
Fri Sep 17 10:56:29 EDT 1999


I've just noticed that the 'mapped' helper function write_flash(), when 
compiled with 2.3.17, requires __divdi3 and __moddi3 from libgcc.a 

This is because of these two lines (just after line 500, at the beginning of 
flash_write):

      // Compute the page offset and reposition
      base = map->page(map,start/map->pagesize);
      off = start %  map->pagesize;

Given that our map window is always going to be a power of two, I suggest that 
we ought to use shifts instead of div/mod here, and change mapsize to be a 
logarithm instead of the actual size.

Jason?




----                                 ----                                 ----
David Woodhouse        David.Woodhouse at mvhi.com       Office: (+44) 1223 810302
 Project Leader,     Process Information Systems      Mobile: (+44) 976 658355
    Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
             finger dwmw2 at ferret.lmh.ox.ac.uk for PGP key.




To unsubscribe, send "unsubscribe mtd" to majordomo at imladris.demon.co.uk



More information about the linux-mtd mailing list