1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 21:30:29 +02:00

Write DWARF files list in correct order.

* module/system/vm/assembler.scm (link-debug): Fix order of writing the
  source files list; it was being written backwards.
This commit is contained in:
Andy Wingo 2013-11-07 10:52:47 +01:00
parent 6e422a3599
commit 32ca15d7d7

View file

@ -1761,14 +1761,17 @@ it will be added to the GC roots at runtime."
;; uleb128 for each of directory the file was found in, the ;; uleb128 for each of directory the file was found in, the
;; modification time, and the file's size in bytes. We pass ;; modification time, and the file's size in bytes. We pass
;; zero for the latter three fields. ;; zero for the latter three fields.
(vlist-for-each (match-lambda (vlist-fold-right
(lambda (pair seed)
(match pair
((file . code) ((file . code)
(put-bytevector line-port (string->utf8 file)) (put-bytevector line-port (string->utf8 file))
(put-u8 line-port 0) (put-u8 line-port 0)
(put-uleb128 line-port 0) ; directory (put-uleb128 line-port 0) ; directory
(put-uleb128 line-port 0) ; mtime (put-uleb128 line-port 0) ; mtime
(put-uleb128 line-port 0) ; size (put-uleb128 line-port 0))) ; size
)) seed)
#f
files) files)
(put-u8 line-port 0) ; 0 byte terminating file list. (put-u8 line-port 0) ; 0 byte terminating file list.