Page MenuHomeFreeBSD

Make this code position independent
ClosedPublic

Authored by emaste on Apr 30 2016, 3:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 12:57 PM
Unknown Object (File)
Fri, Apr 19, 11:28 PM
Unknown Object (File)
Mon, Apr 1, 9:23 PM
Unknown Object (File)
Mar 18 2024, 2:47 PM
Unknown Object (File)
Mar 18 2024, 2:47 PM
Unknown Object (File)
Dec 19 2023, 10:39 PM
Unknown Object (File)
Nov 29 2023, 4:30 AM
Unknown Object (File)
Nov 29 2023, 4:30 AM
Subscribers

Details

Summary

Doing a buildworld of freebsd with lld found only this case where a rw text segment would have been required.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rafael.espindola_gmail.com retitled this revision from to Make this code position independent.
rafael.espindola_gmail.com updated this object.
rafael.espindola_gmail.com edited the test plan for this revision. (Show Details)
davide edited edge metadata.
This revision is now accepted and ready to land.Apr 30 2016, 10:39 PM

ping. Note that I don't have commit access.

@delphij , @cperciva (or anybody else from security) can you please sign-off this one before it gets in?

emaste edited edge metadata.
emaste added a subscriber: kib.
  • Avoid GOT for non-PIC object
  • Just use . instead of a specific label

Submitted by: @kib

This revision now requires review to proceed.May 5 2016, 8:36 PM
kib added a reviewer: kib.
This revision is now accepted and ready to land.May 5 2016, 8:57 PM

(And, rename crypt586.s to crypt586.S)

@kib pointed out this comes from crypto/openssl/crypto/des/asm/crypt586.pl.

As of rS109998 crypt586.pl has:

sub fcrypt_body
        {
        local($name,$do_ip)=@_;

        &function_begin($name);

        &comment("");
        &comment("Load the 2 words");
        $trans="ebp";

        &xor(   $L,     $L);
        &xor(   $R,     $R);

        # PIC-ification:-)
        &picmeup("edx","DES_SPtrans");
        #if ($cpp)      { &picmeup("edx","DES_SPtrans");   }
        #else           { &lea("edx",&DWP("DES_SPtrans")); }
        &push("edx");   # becomes &swtmp(1)
        #
        &mov($trans,&wparam(1)); # reloaded with DES_SPtrans in D_ENCRYPT      

        &push(&DWC(25)); # add a variable

but the generated version in this review was added in rS95967 prior to that change.

This revision was automatically updated to reflect the committed changes.

Reverted in rS299172 as these files are actually generated output.

Proposal in D6237 to add a "Generated from" comment so that it's more clear in the future that they should not be edited directly.

We'll need to find a different way to address the .text relocation.