Closed Bug 277792 Opened 20 years ago Closed 16 years ago

--enable-reorder produces non-loadable mozilla-bin with gcc 2.953 in BeOS R5 due voluntary assumptions in mklinkscript.pl

Categories

(Firefox Build System :: General, defect)

x86
BeOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: sergei_d, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.7a) Gecko/20050108
Build Identifier: Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.85a) Gecko/20050108

Mozilla or FireFox built under BeOS R5.0* (netserver) with gcc 2.95.3
(http://bebits.com/app/4011) cannot start.
Message in shell is "cannot execute binary".
Author of gcc 2.95.3 port for BeOS, Oliver Tappe, had look at that problem, and
found, that line 
print TMP "*(.text)\n";
in mozilla/config/mklinkscript.pl is too "brave" in assumptions.

Hope his comment and patch will follow.

Though, as notice. It seems that ELF loader (?) in later BeOS version can handle
such builds, but IMHO, it is better to have in future less voluntary and more
generic linkscript

Reproducible: Always

Steps to Reproduce:
Preliminary patch before Oliver's more robust comments
Oliver, when you reach this,
look at
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/config/mklinkscript.pl
namely, at version 3.1 link.
Portion in discussion was created under rewite which allows statically linked
app, but bug number there seems wrong.
Attachment #170829 - Flags: review?(timeless)
I believe that mklinkscript.pl insists on the default linker script of (gnu) ld having a 
specific format which isn't the case with newer ld versions.
ld --verbose (with ld-2.10) produces these lines:
---
  .text      :
  {
    *(.text)
---
at the start of the text section and mklinkscript.pl expects to find them like this.

However (at least) ld-2.15 yields this instead:
---
  .text           :
  {
    *(.text .stub .text.* .gnu.linkonce.t.*)
---
which causes mklinkscript.pl to replace the last line by '*(.text)' resulting in the loss 
of .stub .text.* and .gnu.linkonce.t.* sections during the link with the generated linker 
script (and I suppose that especially dropping linkonce sections is no good).

The patch that Sergei has attached is my way of convincing mklinkscript.pl to *copy* the 
line following the '{' instead of blindly replacing it with '*(.text)' only.
Attachment #170829 - Flags: review?(timeless) → review+
Product: SeaMonkey → Core
Whiteboard: CLOSEME?
This code doesn't exist any more on the trunk or 1.9.0 branches.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
Whiteboard: CLOSEME?
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: