Bug 5328 - libbfd: separate debug files open as text on MinGW, breaks
Summary: libbfd: separate debug files open as text on MinGW, breaks
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 21:45 UTC by Frank Richter
Modified: 2007-11-15 05:21 UTC (History)
1 user (show)

See Also:
Host: i686-pc-mingw32
Target: i686-pc-mingw32
Build: i686-pc-mingw32
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Richter 2007-11-14 21:45:12 UTC
separate_debug_file_exists() opens the debug info file as a text file on MinGW.
This means it's incorrectly read: CRLF translation takes place and a byte 0x1a
(^Z) is treated as the end of file. This means that it's very unlikely that
separate debug files pass the crc check. 

Solution: open the file with the O_BINARY flag.