Bug 44609

Summary: [EFL] Add linker script to export less symbols
Product: WebKit Reporter: Lucas De Marchi <lucas.de.marchi>
Component: New BugsAssignee: Lucas De Marchi <lucas.de.marchi>
Status: RESOLVED FIXED    
Severity: Normal CC: antognolli+webkit, barbieri, commit-queue, gns, gyuyoung.kim, jmalonzo, kenneth, leandro, tonikitoo, zecke
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on: 44767, 50762    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Lucas De Marchi 2010-08-25 07:02:50 PDT
[EFL] Add linker script to export less symbols
Comment 1 Lucas De Marchi 2010-08-25 07:13:50 PDT
Created attachment 65414 [details]
Patch
Comment 2 Lucas De Marchi 2010-08-25 07:22:22 PDT
Some numbers about the exported symbols (nm -D WebKit/libewebkit.so |  wc -l):


                 |  SHARED_CORE=ON  | SHARED_CORE=OFF
=======================================================
   linker script |             716  |             959
no linker script |            1110  |            1073
Comment 3 Lucas De Marchi 2010-08-26 12:20:47 PDT
CCing the gtk guys who did the linker script for autotools.

Why aren't you using the 'extern "C++" { };' in your script?
Comment 4 Holger Freyther 2010-08-26 19:05:12 PDT
Maybe you should stop using internal WebCore types first and then worry about exporting symbols?

Regarding the 'extern "C++" {}'. I didn't know it, gcc on debian had a bug that it made the new/delete operator have external linkage and we solved it by filtering out _Z*.
Comment 5 Lucas De Marchi 2010-08-27 07:42:47 PDT
(In reply to comment #4)
> Maybe you should stop using internal WebCore types first and then worry about exporting symbols?

At a first look, I thought it would be harder than it is. So I sent this patch first. It turned out that it's not that hard. I'm preparing a patch to fix that and after I'll send a new patch on this bug

> 
> Regarding the 'extern "C++" {}'. I didn't know it, gcc on debian had a bug that it made the new/delete operator have external linkage and we solved it by filtering out _Z*.

These one I think it's ok, because it's the way you differentiate C++ from C. But I was talking about the exceptions for fastRealloc, fastMalloc etc. IMHO, those would be nicer if they were demangled by linker.
Comment 6 Lucas De Marchi 2010-08-27 07:43:35 PDT
Comment on attachment 65414 [details]
Patch

Not good. Clearing flags.
Comment 7 Lucas De Marchi 2010-09-03 05:12:44 PDT
Created attachment 66483 [details]
Patch
Comment 8 Eric Seidel (no email) 2010-12-03 13:14:04 PST
Comment on attachment 66483 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=66483&action=review

Seems OK otherwise.

> ChangeLog:5
> +        [EFL] Add linker script to export less symbols

fewer, not less.
Comment 9 WebKit Commit Bot 2010-12-14 03:38:57 PST
The commit-queue encountered the following flaky tests while processing attachment 66483 [details]:

transitions/transition-end-event-transform.html bug 51024 (authors: dino@apple.com, ojan@chromium.org, and pol@apple.com)
The commit-queue is continuing to process your patch.
Comment 10 WebKit Commit Bot 2010-12-14 03:40:22 PST
Comment on attachment 66483 [details]
Patch

Clearing flags on attachment: 66483

Committed r74012: <http://trac.webkit.org/changeset/74012>
Comment 11 WebKit Commit Bot 2010-12-14 03:40:29 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Lucas De Marchi 2010-12-14 05:20:31 PST
(In reply to comment #11)
> All reviewed patches have been landed.  Closing bug.

Eric, did you see this bug depended on other open bugs?


Now that this patch is in, I'll let it like this. I'll have to partially revert this one when the other patches make it.