Opened 5 years ago

Closed 5 years ago

#293 closed defect (fixed)

emxomf - enhance to warn for out of range HLL debug index rather than die

Reported by: stevenhl Owned by:
Priority: normal Milestone: libc-0.6.6
Component: emx Version: 0.6.5
Severity: normal Keywords: emxomf
Cc:

Description

When building large applications, such as firefox it is possible for the HLL type index to exceed 32K. The current emxomf behavior is the die. It is recommended that the debug behavior be changed to print a warning and force the index to 0.

The attached patch is the code used to build the emxomf used to build the current firefox.

Attachments (1)

emxomf.c.diff (1.0 KB) - added by stevenhl 5 years ago.
patch emxomf to warn rather than die.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by stevenhl

patch emxomf to warn rather than die.

comment:1 Changed 5 years ago by stevenhl

  • Milestone changed from libc-0.6.6 to libc-0.7
  • Version changed from 0.7 to 0.6.5

comment:2 Changed 5 years ago by stevenhl

  • Milestone changed from libc-0.7 to libc-0.6.6

comment:3 Changed 5 years ago by dmik

A good test case that hits the index limit is this file: https://github.com/bitwiseworks/mozilla-os2/blob/master/content/base/src/nsDocument.cpp. Note that it was also the reason this ticket was introduced by Steven. It would simply fail to compile with Index too large before and with the Steven's patch applied it gives just a warning:

emxomf warning: HLL debug suppressed for symbol '__ZN7mozilla15FullscreenRoots9sInstanceE' - index 33100 too large
emxomf warning: HLL debug suppressed for symbol '_gPendingPointerLockRequest' - index 39164 too large

I don't know though if it's something that may be fixed or it's an invincible OMF format limitation.

comment:4 Changed 5 years ago by bird

  • Component changed from binutils to emx
  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from enhancement to defect

Yes, we should really warn rather than die in this case, because I'm not even sure the PUBDEF and EXTDEF type indexes are really used by debuggers / linkers. It was a feature I added a good long while back, just to make sure it was covered in case anyone do look at the info.

So, in r3919 I've modified set_hll_type() to warn at most once per input file / library member. I don't feel we need to warn about every symbol.

Note: See TracTickets for help on using tickets.