Making global symbols local

Hello everyone.
I have a problem that has to do with all types of ELF files, not only drivers:
If I load a kernel module (in my case a misc module that is referred by other modules) all global symbols of my module become global kernel symbols. As I do not want to become all symbols global kernel symbols I look for a possibility to change global symbols into local ones.
As the module is made from different object files I cannot just make all functions "static" in the C compiler; the symbols need to be global until the final "ld -r" step.
Example:
- "a.o" contains a symbols which are used by "b.o". Therefore the symbols must be global.
- The kernel module is made by "ld -r a.o b.o .... -o output.o".
- As the symbols should not be used outside "output.o" I want to change them to local symbols.
I thaught about writing a program that:
- Makes all global symbols local but "undefined" (extern) symbols and symbols I want to be global (e.g. _init).
- Modify relocations (relocations to local symbols may cause problems)
- Rearrange the symbol table (global symbols must follow local ones)
- Update the relocations again (due to new symbol table order)
Is there a program that can make global symbols local or do I have to write such a program myself ?
Thank you very much.
Martin D. J. Rosenau

Modify relocations (relocations to local symbols may cause problems)I found out that Sun variant of "ld" as well as "modload" accept relocations to local symbols.
This made writing the program very easy as the three other steps (making global symbols local, rearranging the symbol table and changing the symbol numbers in the relocation tables) are quite simple compared with modifying the relocations.

Similar Messages

  • Global vs local attributes

    Hi Folks,
    How does one go about making attributes - local and global ?
    Regards,
    Vinay

    Hi Vinay,
    Attribute is global or local will depend on at which level you are adding the attributes in your taxonomy mode. If you are adding your attribute at root then it will be global as it is applicable to whole tree beneath and if you are adding them at a particular node in a tree it will be applicable to all its descendents.
    Note: However attribute that is global should be modeled as a field as it is appicable to all the records.
    Hope this helps.
    Regards,
    Pooja

  • Shall I use global or local variables for my program?

    Hello,
    1) I am using 2 while loops in parallele. One 50 ms timed and the other one 1000 ms. The 50 ms one gets data from a sensor. I want to display that data every 1000ms in the 1000 ms loop. I have used global variables to do that. Should I better use local variables?
    2) This question deals with the VI I have attached
    a)  Shall I initialise the "  Quitter programme " global variable in the main VI aswell ? Or is what I have done enough?
    b)
    I want the sequence to continue ( finishes the last sequence and goes back to the first one without any delay if possible ) until the user presses Quit. I am concerned about the " wait until " icon of the exterior main while loop ( set to be 250 ms at the moment ). This time, 250 ms, is the time it takes between the end of the last sequence and the beginning of the first sequence? Is that right? Once u start the first sequence, the while loop doesn’t do anything until the end of the last sequence ( my 3 sequences can take several minutes ) ?
    Hope I am clear… lol
    Don’t hesitate to ask any questions if not clear enough
    thanks a lot,
    David
    Attachments:
    Example1.zip ‏28 KB

    Bonjour Marc.  You will definitely have a race condition because you are writing to the global in a parallel loop.  You could click the stop button in the quitter program, then before it is read in the main loop, the lower loop writes a false to it, and your click is lost.  Why do you want a separate quitter program?  You may have a good reason but it isn't clear here.  I would not use globals or locals for this, just put your stop button on the main vi.  You already have one, so why do you want another one in another vi?  If you must do it this way, eliminate both lower loops.  They are not necessary.  The global default is set to false, so when you run the vi, it is false.  The button mechanical action is set to latch when released, so after clicking it will turn true until the main vi reads it, then it will automatically turn false.  So you don't need the lower loops to keep writing false to it.  If you just eliminate both lower loops, it will work fine.  The only purpose I could see for the quitter vi is to have one button cause several vi's to stop.  Instead of doing it this way, put one stop button in your main vi, create a reference (right click - create - reference), and wire this reference into all subvi's that the main calls.  The subvi's must be changed to accept the reference and use it.  This would be a much better method to close all vi's with one button.
    You could also get rid of the sequence structure (it hides code and makes it more difficult to read).  Just put all your code side by side.  The error in/out wire will ensure that the execution order will be fixed, just like in your first sequence with the open file and write file functions.  Just wire the error out of the write vi to the second write vi, and then the error out of the second write vi to the close vi.  No sequence structure needed, and all your code is viewable on one screen.
    - tbob
    Inventor of the WORM Global

  • Global and Local Variable

    Hi Gurus, I was unable to see where I can define local and global variables? I see that help.sap.com documentation but where do I create. All variables that I create, are global because, they are visible to all and they all can use it? Any help would be greatly appreciated.

    As far as I know, Variables are re-usable objects that are not dependent upon InfoProvider. When I look at this link
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db07d555411d189660000e829fbbd/frameset.htm
    it talks about Global and Local variable? Is this different than what we use in Query Designer?

  • Change Location to Global from Local

    Hi
    I am using R12 and have this issue:
    I need to change a location which is local to Global. I am unable to do do this using HR manager responsibility. It shows that field is protected against update.
    Is there any wayout to achieve this? Can we also change a location from Global to Local?
    Please help.
    Regards
    Sangeeta

    Hi,
    Please see these docs.
    Is It Possible To Update the Address Style Field on the Location Screen (PERWSLOC) Once the Location Is Saved? [ID 549448.1]
    Understanding Employee Address and Location Address within Oracle Human Resources (HRMS) [ID 469674.1]
    Thanks,
    Hussein

  • SPED PIS/COFINS - Plano de contas Global e Local.

    Olá Pessoal,
    Após aplicar todas as notas referentes ao SPED PIS/COFINS começei rodas os arquivos e validá-los, porém uma das primeiras coisas que encontrei foi aqui estamos utilizando o plano de contas Brasil(ACBR) e temos o plano de contas global(PCOA), pela legislação brasileira para o envio do arquivo pelo menos para o SPED ECD tivemos que mandar as contas do plano de conta local(ACBR) com as contas alternativas, ou seja, apenas contas sem letras. Porém hoje quando rodo o SPED PIS/COFINS hoje nos registros 0500 e F100 as contas que estão sendo carregadas são as contas do plano de contas global e não as contas alternativas.
    No SPED ECD existe um flag que podemos usar para as contas alternativas, nesse SPED PIS/COFINS não deveriamos ter também ???
    Obrigado,
    Michael Peretto

    Bom dia Vini,
    Não está  usando o report standard, está?
    O módulo de formatação no standard cuida disso independente do usuário:
          WHEN 'P'.
    * --- Change decimal separator and delete spaces
            REPLACE '.' WITH ',' INTO lv_field.
            CONDENSE lv_field NO-GAPS.
    Atenciosamente, Fernando Da Ró

  • How to change Variant in Code inspector from Global to local.

    Hi,
    I have created my own variant,object set and inspection through T-code SCI and this has been created only for my id.
    Now when i go to SE38 and run Code Inspector i want the CI to use my variant instead of the Global DEFAULT variant.
    Kindly tell me how can i change from DEFAULt to my Local Variant.
    Many Thanks.

    Hi,
    abap_learner_das wrote:
    > Now when i go to SE38 and run Code Inspector i want the CI to use my variant instead of the Global DEFAULT variant.
    in that case you have to create a variant called "DEFAULT" as your local one. That variant will be used in SE38.
    In SE38 you can only use the DEFAULT variant. either the global one (if your user does not have a local one named DEFAULT) or the local one of your user.
    HTH,
    Hermann

  • CSS11000 global v. local and remote load balancing?

    I understand the practice of local LB on the CSS. I do not understand the same for remote LB. I have two mutually exclusive DMZs, but with the same content at each site. How does the CSS at site A know if content at site B? Site B's CSS tells it via the app session, right? Why can't I see that in the summary of service at site A's CLI?

    Houston side:
    !Active version: ap0502003
    !*************************** GLOBAL ***************************
    bridge spanning-tree disabled
    dns-server zone 1 tier1 "zone1" roundrobin
    dns-server
    dns-record a www.midcon.com 12.155.32.98
    app session 208.246.87.241 14 authChallenge ************ encryptMd5hash
    app
    host HOUCSSDMZ 10.43.239.241
    ip route 0.0.0.0 0.0.0.0 10.43.236.1 1
    !************************** SERVICE **************************
    service houauth
    ip address 10.43.232.98
    active
    service houweb3
    ip address 10.43.232.99
    keepalive type http
    active
    service houweb4
    ip address 10.43.232.100
    keepalive type http
    active
    service lkw_midcon_sorry
    ip address 208.246.87.98
    keepalive type none
    active
    !*************************** OWNER ***************************
    owner midcon.com
    dns both
    dnsbalance preferlocal
    content dns
    protocol udp
    port 53
    add service houauth
    vip address 10.43.236.98
    balance leastconn
    add dns www.midcon.com
    active
    content www
    vip address 10.43.236.98
    balance weightedrr
    add service houweb3
    add service houweb4 weight 2
    protocol tcp
    port 80
    url "/*"
    primarySorryServer lkw_midcon_sorry
    active
    Lakewood side:
    !Active version: ap0502003
    !*************************** GLOBAL ***************************
    bridge spanning-tree disabled
    dns-server
    app session 12.155.32.241 14 authChallenge ************ encryptMd5hash
    app
    host LKWCSSDMZ 208.246.87.241
    ip route 0.0.0.0 0.0.0.0 208.246.87.1 1
    service hou_midcon_sorry
    ip address 12.155.32.98
    keepalive type none
    active
    service lkwauth
    ip address 10.34.232.98
    active
    service lkwweb4
    ip address 10.34.232.99
    keepalive type http
    active
    !*************************** OWNER ***************************
    owner midcon.com
    dns both
    dnsbalance preferlocal
    content dns
    protocol udp
    port 53
    add service lkwauth
    vip address 208.246.87.98
    balance leastconn
    add dns www.midcon.com
    active
    content www
    balance leastconn
    add service lkwweb4
    vip address 208.246.87.98
    protocol tcp
    port 80
    url "/*"
    primarySorryServer hou_midcon_sorry
    active
    HOUCSSDMZ# sh app
    APP CONFIGURATION:
    Enabled PortNumber: 3699 MaxFrameSize: 10240
    HOUCSSDMZ# sh app sess
    App Session Information 'no hostname':
    Session ID: 83c381a0 IP Address: 208.246.87.241 State: APP_SESSION_UP
    HOUCSSDMZ# sh serv summary
    Service Name State Conn Weight Avg State
    Load Transitions
    houweb3 Alive 0 1 2 12
    houweb4 Down 0 1 255 15
    houauth Alive 0 1 2 0
    lkw_midcon_sorry Alive 0 1 2 0
    [email protected] Alive 0 1 2 0
    LKWCSSDMZ# sh app
    APP CONFIGURATION:
    Enabled PortNumber: 3699 MaxFrameSize: 10240
    LKWCSSDMZ# sh app sess
    App Session Information 'no hostname':
    Session ID: 859f39f0 IP Address: 12.155.32.241 State: APP_SESSION_UP
    LKWCSSDMZ# sh serv summary
    Service Name State Conn Weight Avg State
    Load Transitions
    lkwauth Alive 0 1 2 8
    lkwweb4 Alive 1 1 2 30
    hou_midcon_sorry Alive 0 1 2 0
    [email protected] Alive 0 1 2 0
    As you can see the DNS service is peering. I don't understand why the HTTP is not. Hopefully I haven't deleted too much information. I setup the sorryservices recently per the suggestion of TAC, but I don't agree with that recommended solution.

  • Converting from global to local filesystem

    Hi all, I have a 2-node cluster running Sun Cluster 3.2 in which multiple file systems are currently marked as global file systems (ie the file systems are visible from both nodes and they all have the "global" keyword in /etc/vfstab). I've been requested to turn these (global) file systems into "local" file systems.
    Is this done by removing the keyword "global" from /etc/vfstab for each file system on both nodes and then rebooting each node?
    Thanks in advance,
    Stewart

    Hello,
    yes, by removing the global flag until the next mount of that vfstab entry.
    You can check it in the output of the mount command for that FS.
    HTH,
    jono

  • Droid 2 Global: symbols attach to last word when typing???

    I have searched and did not see any other topics about this. Has anyone noticed a problem while typing on the Droid 2 Global (in text messages, browser, etc) that if you type special characters/symbols, they attach to the end of the word you previously typed?
    For example, a normal sentence would type like this:
    "Hey I'm running to the store & I'll call you later."
    However, on the Droid 2 Global, it types like this:
    "Hey I'm running to the store& I'll call you later."
    The & automatically attaches to the end of the previous word, even when I press the spacebar before typing it.
    This happens for all symbols I have typed. Sure I can go back and edit it, but it is SUCH a pain to go back and RE-ENTER the space, when I already pressed the spacebar in the first place. I have tried turning "auto-correct" off and it still does this while typing. Does anyone know how to fix this?
    Thanks!

    katiebe wrote:
    I have searched and did not see any other topics about this. Has anyone noticed a problem while typing on the Droid 2 Global (in text messages, browser, etc) that if you type special characters/symbols, they attach to the end of the word you previously typed?
    For example, a normal sentence would type like this:
    "Hey I'm running to the store & I'll call you later."
    However, on the Droid 2 Global, it types like this:
    "Hey I'm running to the store& I'll call you later."
    The & automatically attaches to the end of the previous word, even when I press the spacebar before typing it.
    This happens for all symbols I have typed. Sure I can go back and edit it, but it is SUCH a pain to go back and RE-ENTER the space, when I already pressed the spacebar in the first place. I have tried turning "auto-correct" off and it still does this while typing. Does anyone know how to fix this?
    Thanks!
    This is a well-discussed issue on the Motorola Forums, see https://supportforums.motorola.com/message/316254#316254
    for the same issue on the Pro.
    It will be fixed in the next update, whenever that will be!  Unlike some other stuff though, we can be fairly sure that it WILL be fixed.  The Droid X had the same issue and the update to that did solve the problem.   One solution discussed there is to download Swiftkey (free) which alsosolves  the issue on  the physical keyboard.   Didn't work for everyone though.

  • Is This a Global Versus Local Variable Problem?

    I intend to use a variable (myselector) with a text value (e.g. roses, Big Sur, Pacific Grove, night, etc.) for the sort criteria of my photography list.  Selection of a tab from a Tabbed Panel will appropriately define the variable and the selected thumbnails will display in the Content Panel.
    The variable "myselector" is defined in the head section; a function for each tab of the Tabbed Panel will redefine the variable per the selected tab.  Within the function, I am not using "var" to call the variable.  Though the variable "myselector" should be global, the changes to its value are discarded when the function closes.  This indicates that it is functioning like a local variable in the function.  After a bit of reading, I've not found the cause of the global/local discrepancy or a fix for it.
    Diagnosis History - I generated a simplified code.  Variable "myselector" is defined as "abcd"; function "myfilter" is called by onclick of the text "button" and changes "myselector" to "efgh".  At the end of the file, I used "document.write (myselector) to output the "myselector" value.  The script follows.
    The end value of "myselector" does not change.  However, when I add "document.write (myselector)" to the function, then the changed value is displayed.
    I ask someone to explain what I am doing incorrectly or, at least, guide me to a solution.  I thank you for your assistance.
    Scott
    <script type="text/javascript">
    var myselector="abcd";
    function MM_callJS(jsStr) { //v2.0
      return eval(jsStr)
    </script>
    </head>
    <body>
    <div id=text>
    <p onclick="MM_callJS('myfilter();')">Button</p>
    <script type="text/javascript">
    function myfilter() {myselector="efgh"; }
    </script>
    <script type="text/javascript">
    document.write (myselector);
    </script>
    </div>

    Dear Ben:
    I thank youfor your patience.  This includes the script using Insert - Syntax Highlighting - Java.
    The coding needs a lot of clean up but I want it to work, first.
    Scott
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script type="text/javascript">
    var dsphotodata = new Spry.Data.XMLDataSet("EM_photo.xml", "/gallery");
    </script>
    <script  type = "text/javascript">
    function MM_callJS(jsStr) { //v2.0
      return eval(jsStr)
    </script>
    <script type="text/javascript">
    var dsphoto = new Spry.Data.XMLDataSet("EM_photo.xml", "/gallery/photos/photo");
    dsphoto.filter(subjectfilter);
    var myselector;
    </script>
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    This is a test of Scott's efforts to program his website.
    <br />
    <br />
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0" onclick="MM_callJS('{myselector=\'animal\'}; subjectfilter(); dsphoto.filter(subjectfilter); ')">Tab 1</li>
        <li class="TabbedPanelsTab" tabindex="0" onfocus="MM_callJS('myselector=\&quot;pgbeach\&quot; subjectfilter(); dsphoto.filter(subjectfilter); ')">Tab 2</li>
        <li class="TabbedPanelsTab" tabindex="0">Blank</li>
    </ul>
      <div class="TabbedPanelsContentGroup">
        <div class="TabbedPanelsContent" >Content 1
          <br />
    <br />
    <script> {document.write (myselector)} </script>
          <br />
          <div spry:region="dsphoto dsphotodata"> <img src="{dsphotodata::thumbnail/@base}{@thumbpath}" width = {@thumbwidth}px height = {@thumbheight}px spry:repeat="dsphoto" onclick="dsphoto.setCurrentRow('{ds_RowID}');" /></div>
        </div>
        <div class="TabbedPanelsContent">Content 2
          <script> {document.write (myselector)} </script>
          <br />
          <div spry:region="dsphoto dsphotodata"> <img src="{dsphotodata::thumbnail/@base}{@thumbpath}" width = {@thumbwidth}px height = {@thumbheight}px spry:repeat="dsphoto" onclick="dsphoto.setCurrentRow('{ds_RowID}');" /></div>
        </div>
        <div class="TabbedPanelsContent">Content 3  <script> {document.write (myselector)} </script><br />
    <div spry:region="dsphoto dsphotodata"> <img src="{dsphotodata::thumbnail/@base}{@thumbpath}" width = {@thumbwidth}px height = {@thumbheight}px spry:repeat="dsphoto" onclick="dsphoto.setCurrentRow('{ds_RowID}');" /></div>
    </div>
    </div>
    </div>
    <div id="Selected_Photo" spry:detailregion = "dsphoto dsphotodata"  >
    <img src="Photo-Thumbnails/{@thumbpath}" width = {@thumbwidth}px height = {@thumbheight}px /><br />
    <img src="Photo-Email/{@path}" width = {@width}px height = {@height}px />
    </div>
    <script type="text/javascript">
    var subjectfilter = function(dataSet, row, rowNumber, criteria) { if (row["@subject"].search (myselector) != -1) return row; return null; };
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:2});
    //-->
    </script>

  • Policy regarding creating global or local classes?

    Hi!
    What policy do you have regarding creating local or global classes in your company? We have decided to mostly use local classes since there is a risk of reusing global classes (when changing something in the global class after it has been used by several programs etc.) . But on the other side it is much easier to use transaction SE24 than creating all the includes by hand.  Have anyone else made thoughts about this issue?
    Regards, Tine

    Hi,
    The policy is
    <b>Create global class</b> if you want the class to be <b>reused</b>.
    And<b> to avoid problems</b> when you change the class, make sure you change class in such a way that it does not effect the existing user's of the class.
    Like <b>use OPTIONAL parameters</b> when you change method signature, <b>avoid changing method names</b>, <b>instead add new methods</b>.
    You should use local classes only when you are sure that the code there is needed only by your program and nobody else.
    If you keep creating local class's and <b>if two programs need the same class it is redundant to create local class's</b> and if you want a change in the class you have to change in all the places.
    I hope it is clear.
    Regards,
    Sesh

  • What are global dependcies & local dependcies in VC

    Hello
    When do we call global object dependency and when do we call local object dependency
    I am presuming that
    we call <b>local object dependency </b>when we maintain object dependencies (selection conditions, preconditions, procedures) in <b>BOMs & Routings</b>
    we call <b>global object dependencies</b> when we maintain  <b>object dependencies in Configuration profile</b>
    As in <b>configuration profile</b> it is maintained centrally & <b>not subjected to a specific object</b> while in <b>BOMs & Routings</b> we select a <b>characteristic value</b> and maintain the <b>object dependencies</b>
    Please clarify

    Global dependencies :
    #They are independent of any object.
    #They are identified by a name that you assign, and are maintained and managed centrally.
    #If you change a global dependency, the change affects all the objects where the dependency is used.
    Local dependencies :
    #They are only available to the object for which you create them
    #You cannot use the central maintenance functions on these dependencies
    #you cannot allocate them to other objects
    #They are identified by a number assigned by the system, not an external name

  • Making  ".DS_Store" and ".localized" Files Invisible With Cocktail

    I got Cocktail and I know that these files shouldn't be deleted
    How exactly would I go about making these files invisible with cocktail? All I see is delete or prevent ".ds_store files". And what about these ".localize" files? does it take care of that along with ds store?

    Any files that have names that begin with a "." are supposed to be invisible on your Mac.
    You might have used Cocktail and gone to the "Interface" button and clicked on the "Show invisible Items" box. If so uncheck the box. You might have to log out and then back in to see a difference.
    A .DS_Store file holds the information which controls the way a folder will be opened; i.e., the shape and size of the window, the position of the window on the desktop and whether file, folder or icon view has been selected. If you were to delete the .DS_Store the folder would revert to the system default next time it is opened and a new blank .DS_Store would appear (invisibly).
    The only problem with .DS_Store files is that they confuse Windows users because they do show up on network shared drives, and flash drives that are formatted with Fat32.
    They actually help the user keep individual folders working in a layout they choose and some people get upset when all their hard work is destroyed by having the system revert the View settings to the system default.
    I don't know much about the .localized files. I suspect they are used by the system help files and other settings to know what language and measurements to use in system dialogs and messages. I could be wrong here, but they are still supposed to be invisible on a Mac.

  • Checklist for making transition from local testing server to remote

    Does anyone know of any resources which take one through the necessary steps required in putting an ADDT-built site to a remote server? I test on XAMPP (basic) and am dreading the errors I will discover when I actually put one of these sites to server...

    It all depends on waht you are going to do with the data on the remote.
    if tehre are no updates there, creating a simple materialized view on the remote to pull it's data from the local should suffice.
    If there are updates on the remote, you will more than likely want to look into either Multi-master replication, or updatable materialized views.

Maybe you are looking for

  • Indesign to PDF switch sizes, why?

    I'm using Indesign CS2 and trying to make a book to Blurb PDF. I've downloaded their templates for Indesign. Selected the 221-296 standard-portrait template which size is to be and remain 1278x774 pts. I click file>adobe preset>Blurb x3-2002>marks, a

  • Can't access safari :(

    I have a prob;em with my macbook pro; i can't access safari which means i can't get on any website!!!! what should i do ?? please help!!!!!!!!!!!!!!!!!!!!!

  • Share Deskjet 3650 on XP with Laptop running Windows 7

    Hi Simple question - maybe not so simple an answer.   I have an XP PC with a USB connected Deskjet 3650.  I want to share this device with a Laptop running Windows 7 64 bit.  My attempts so far have failed - although I can see the printer when I sear

  • TS3999 Help request for Iphone 4S calendar that won't sync with Mac OS X

    My I-Phone 4S (6.1.3) calendar changes won't sync with my MAC OS-X (10.8.2) after trying the Apple support suggestions.  Please provide your solutions if you have experience with this issue.  Thank you in advance.

  • ORA-27302: failure occurred at: skgpspawn

    In the alert log I see lot of following errors : Process J000 died, see its trace file Process m000 died, see its trace file In past I experienced database crash after these error messages appeared in alert log. Any help is appreaciated. Sanjoy